Codebreaker Academy · Coding · Ages 9–12
Build your own game
Game makers write scripts: short lists of instructions that tell a game what to do. In twelve lessons you’ll build one game, a feature at a time, and write its script yourself in Lua, the language Roblox Studio grew from. And you can slow the computer right down to watch it read your script, line by line.
1. Design your game
It’s your game, so you choose. You can change your mind any time.
Treasure Dash
2. Build it, one feature at a time
Each lesson adds one thing to your game, and teaches just the coding idea that thing needs. A lesson is eight short cards: play the new feature, guess what its code does, take a tour of the new lines, tinker with the numbers, fix another kid’s bug, then make it yours. Stuck on a card? Press Stuck? Get a hint under it, or open the lesson’s walk-through, which goes through every card. Want more? Every lesson has a More practice page too.
3. See the computer think
From lesson 2 there’s Step mode. It slows your game right down, so you can watch what the computer does with each line.
-
A pointer on the line
An arrow shows which line the computer just ran, and a sentence says what it did, in plain words.
-
Boxes for variables
Each variable is a labelled box. Watch the number inside change, and see which boxes vanish when a recipe ends.
-
One thing at a time
Key presses, clock ticks and bumps each call a recipe of yours. The game finishes one recipe before it starts the next.
For parents and teachers
- Twelve lessons of about 15 minutes, each a deck of eight cards, with a More practice page for the tasks that didn’t fit. Each builds on the last, but every lesson can start from our version of the earlier ones.
- The code is real Lua, the language Roblox Studio’s Luau grew from: what children write here works in Roblox Studio almost word for word. The game commands (
place,walk,say…) belong to this course, the way every game engine has its own. The last lesson moves a piece of the game into Roblox Studio. - Every lesson follows PRIMM: predict, run, investigate, modify, make. Every step is checked by playing the game, so any correct answer passes, however it’s written.
- Helping a child? Each lesson has a walk-through page, linked from its card above: the idea a step at a time, every card with hints and how to do it, the easy mix-ups, and a cheat sheet of the code so far. Read it first, and you’ll know what each card is asking. On the cards, Stuck? Get a hint gives the same help a little at a time, and never the answer to a guess.
- Free, with no sign-up. Nothing is saved in the browser and nothing typed is sent anywhere. Save my game downloads the script as a
.luafile to keep, and Open my game reads it back next time.
Want to know how Enigma scrambled its messages? Try the missions of Codebreaker Academy.