← Games

Game Hub Articles

All articles
Home › Articles
🧑‍🏫

Teaching kids to code with games: what works in our coding club

By Noam · 15 November 2026 · 7 min read

I run a coding club where kids learn HTML, CSS and JavaScript, and I'm convinced the fastest way to get a kid excited about code is to let them make a game. Not a quiz about variables, not a worksheet, but something they can play and show their friends the same day. Here's the approach I recommend.

Why games work

A game gives instant feedback. You change one number, press refresh, and the star falls faster. That loop of change, try and see is the heart of programming, and games make it fun. Games also give kids a reason to learn the boring parts. Nobody wants to learn about if statements in the abstract, but everybody wants to know how to make the game end when the player gets hit.

Start with something tiny that works

A great first project is a catch-the-star game, like the one in Make your first game in 30 lines of JavaScript. It has a basket, a falling star and a score, and it's short enough to finish in one session. That first success matters more than anything else. A kid who leaves the first lesson with a working game wants to come back.

Then: change things

Before writing anything new, let kids change what's there. Make the basket bigger. Change the colours. Make the star fall faster. Add a second star. These small changes teach how the code works without explaining it first, and they let every kid make the game their own.

Teach ideas when they're needed

Introduce new concepts at the moment a kid wants something. "I want the game to end after three misses" is the perfect time to learn about variables and if. "I want lots of stars" is the moment for arrays and loops. Learning something to solve your own problem sticks far better than learning it in advance.

The game loop is the big idea

Almost every game, from a 30-line star catcher to the games on this site, is built on a loop that runs about 60 times a second: read the input, update the world, draw everything. Once kids understand that loop, they can read almost any simple game's code. I explain it in How a browser game works.

Mistakes to avoid

From a small game to a real one

Every game on this site started as a simple version that worked, and then got better one step at a time: graphics, sounds, levels, phone controls, a leaderboard. That's the same path a kid's game can follow. Showing kids that real games are built this way, in small steps, makes a big project feel possible.

Want to try it?

All you need is a computer and a text editor. Start with the 30-line game, change five things about it, and then ask: what would make this more fun? That question is where every game starts.

▶ Read: your first game in 30 linesAll games

More articles

🪩 Pinball tips: how to trap the ball, aim your shots and score moreStop flailing at the flippers. Learn to catch the ball, aim with the flipper, pass it between flippers and use nudges, plus a bit of pinball history.🐍 Snake strategy: how to get a really long snakeHug the walls, sweep in zig-zags and never trap yourself. Simple strategies for the classic Snake game, plus where Snake came from.🎳 Bowling tips and how bowling scoring really worksWhy strikes and spares are worth extra, how a 300 game works, and where to aim to knock down all ten pins.🧱 Brick-breaking games: the story of Breakout and how to clear every levelHow a 1976 arcade game built by two future Apple founders created a whole genre, and how to control the ball's angle to clear bricks faster.🟦 Falling-block puzzle tips: keep your stack flat and clear more linesFlat stacks, a well for the long piece, using Hold and Next, and staying calm at high speed. How to get better at falling-block puzzles like Block Drop.