
Code is a type of language used to give computers easy intructions. Some popular video and online games used coding languages like Python, Lua and C-sharp

Have you ever wondered how the challenges and excitement in a video game is made? Code is the language behind the magic and fun. Learning to code is about breaking big ideas into tiny, clear instructions that even a computer can understand.
Anyone can make a game – even secondary students like you! Free tools like Unity, Pygame and Roblox Studio can help you learn to code and build your own games. We’ll show you how to turn ideas into epic adventures.
Hong Kong students create winning video game in 12-hour hackathon
Coding tells the game what to do
Code tells a computer what to do, and in games, it’s how you make stuff happen.
Imagine code as a conversation between the creator and the game. Every line is a simple command, like teaching a friend the rules of tag. These instructions decide how the game works and what players should do.
For instance, code might say: “When someone touches this door, move them to the rooftop.” Or it could say: “If players interact with an object, this teleports them to the last time they interact with it.”
In many popular games, including those made in Roblox Studio, developers use a language called Lua to write these instructions.
Another language used in games is C-sharp – this is used to create the popular game, Among Us, where players hunt for impostors. In the game, pressing the spacebar on your keyboard starts an emergency meeting. The game checks: “Did the player press the spacebar? If yes, start the meeting.”
Coding is about giving clear instructions: telling the game what to do, when to do it and how to do it.
Where can I make my own games?
Roblox Studio, Pygame and Unity are platforms where you can create your own games.
Unity is the platform that Among Us was built on. You can use Unity’s tools to help you create games – for example, a treasure hunt game that ends once a player grabs every coin.
Pygame uses the programming language, Python. Imagine making a mini-game where characters face off.
Using Pygame, you can draw shapes – like a triangle for a battle arena. Upload an image to use as a character and resize it to fit your arena. Then, give the computer clear steps: show the character and allow the player to move it with arrow keys – then you’ve got a battle going!
Developers start small, like making a character dodge obstacles. Then, they keep improving the game until it is fun to play. Every potential problem with the code is a puzzle, and every fix improves the game and the coder’s skills.
So grab one of these tools, break your idea into clear commands, and let the screen come alive.