Glasgow Science Festival: Game On!
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
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!
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
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.
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!
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?
Part 7: Build your own computer game or animation
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.
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!