Glasgow Science Festival: Game On!

Image
GameOn

Do you like computer games? Wouldn’t it be fun to build your very own games at home? Follow these activities to explore the exciting world of video games, learn the basics of coding in a visual programming language called Scratch and build your very own computer game!

Part 1: Gaming

Image
GameON_Notes

What computer games do you know? Write down the name of a few games that you particularly like.

What do you enjoy the most about these games?

Did you know that all these games were built with the use of computer code?

But what is coding and how can we code a game? Watch the following video to find out more!

Part 2: Programming is a bit like cooking!

Watch the following video to find out what recipes and computer games have in common!

Click here for the You Tube video Introduction to Algorithms

In this video you’ve learnt that an algorithm is a technical term for a recipe. Time to practise with some cooking…um coding!

Part 3: Get the robot to the train station

Image
Gameon_Map

Robots are nothing more than computers that can see or sense the world around them, think and move. Robots, just like any other computer, need very clear instructions to carry out different tasks.

Let’s try programming a robot! Have a look at the following map. The robot needs to get from the Hotel to the Train Station as soon as possible.

Write down a list of instructions for the robot to follow. But be careful! You can only use “robot language”, as shown in the following image. 

Image
Game on Robot Language

Congratulations! You’ve just written your first algorithm!

 

Part 4: The Scratch programming language

Scratch is a simple and fun programming language that is ideal for complete beginners. It is fully visual, and it is one of the most popular block programming languages in the world, which means that you don’t have to type your code but rather plug together different programming blocks.

Scratch was developed by MIT’s Media Lab, it is free and can be used online on its web site or can be downloaded and used offline.

To download and install Scratch, go to  Scratch download on the MIT website and follow the instructions there.

To use the online editor, go to Scratch editor on the MIT website

Part 5: Your first computer program in Scratch

Once you’ve checked that you have access to Scratch, watch the following video to see how Scratch works and to build your very first computer program!

Click here for the You Tube video Introduction to Scratch

Now give yourself a high five! You deserve it!

Part 6: Code a butterfly to fly towards you

Now that you’ve learnt the basics in Scratch, it’s time to take on a programming challenge! Are you up for it?

Click here for the You Tube video Code a Butterfly

Part 7: Build your own computer game or animation

Image
Gameon Tips

And now is when the real fun starts! It’s time to build your very own game or animation in Scratch! Bring it on!

You can build anything you like, from a chasing game, to a racing game, and from a birthday card, to a short movie.

Here are some tips to keep in mind:

Part 8: What do programmers do all day?

Many of the things that you’ve learnt here, such as the definition of an algorithm and the importance of testing your code, apply to professional programming too! Just like yourself, professional programmers spend quite a bit of time fixing errors in their code (also called debugging) and thinking about how to build programs that people will like and find useful.

There are lots of different types of coders, from game developer to artists that build beautiful visualisations using code, and from data scientists that build smart programs to help doctors diagnose disease, to activists that use code to find out whether articles published on the Web contain hate speech.

Can you think of any good uses of coding, which can help us make the world a better place?

Part 9: Want some more?

If you want to keep programming in Scratch, then you might find our Code Yourself! course useful. Code Yourself! is a freely available online course developed by the University of Edinburgh, which provides a gentle introduction to programming using Scratch. Throughout 5 weeks, you’ll get to build a wide range of games, including Fruit Ninja and Flappy Bird! You’ll learn about coding best practices and you’ll hear from a range of professionals how they use code in their daily lives.  

Image
Gameon_CodeYourself

If online courses are not your thing, you can simply keep coding with friends and family. Try to think of games that you would like to play, and start working on your projects in Scratch!

In any case, we hope you keep programming in the future!