Overview
In the last part of the course, we take a step back from the stream that we’ve followed so far and do something different: we make games. The games are small, and they are not meant to be masterpieces. They are meant to teach you one new idea each, and to leave you with something that runs. The next chapter introduces the single idea that every game in this part is built on: the game loop. The following eight chapters each build one complete game and introduce one new idea.
It is still programming, but just in a different context. The study-log project you have carried since Getting Started with Programming is finished; it is a clean, class-based, file-backed program. This course section sets it aside and does something different with the same skills. Everything you learned building the study log — variables and state, lists, functions, files, dictionaries, and classes — is exactly what you need to make games. A game is just a program whose state changes many times per second and gets drawn to a screen.
The structure of this part is as follows:
- The Game Loop and Pyxel introduces the single idea every game is built on:
updatechanges the state,drawshows it, and this happens many times per second, and also introduces Pyxel, the library used to make the games in this part. - An Idle Clicker is the simplest possible game — a number that goes up — and uses it to make the game loop concrete.
- Asteroids, Lite introduces movement: objects with a velocity, a list of them, and the idea of wrapping around the screen edges.
- Breakout introduces bouncing — reflecting a moving object off a surface — and a list of bricks to destroy. It consolidates the two previous ideas.
- Conway’s Game of Life is a breather. There is no player. A grid of cells follows three simple rules, and complex patterns emerge.
- A Maze treats a 2D grid as space: a level the player walks through, where some tiles are walls you cannot enter.
- A Galaga-Style Shooter has two lists that interact — bullets and aliens — and a formation of enemies that move together.
- A Lunar Lander introduces acceleration: gravity pulling the ship down a little more each frame, thrust pushing back, and a fuel gauge that runs out.
- 2048 is a turn-based puzzle whose entire state is one grid of numbers, which makes a feature the real-time games could not easily have: undo.
The game-specific chapters are followed by the AI-collaboration chapter, the capstone, and the closing:
- Iterating With AI on a Real Project is this part’s AI-collaboration chapter, about using suggestions without losing control of the game you are finishing.
- Make Your Own Game is the capstone: no taught game, just a framework for designing and finishing one of your own.
- Recap, Feedback, and Where to Go Next looks back over the whole course and points forward to the wider world of programming.
Recommended Order of Work
A useful rhythm for this part is:
- read The Game Loop and Pyxel and get Pyxel running on your machine,
- work through the game chapters in order, typing each game yourself rather than copying it,
- for each game, once it runs, change one thing and see what happens,
- read Iterating With AI on a Real Project and practise planning and checking one focused change,
- build your own game in Make Your Own Game,
- and finish with the recap, feedback, and where to go next.
The games are ordered so that each one introduces a single new idea on top of the previous ones. Reading them in order is worth it: the bouncing in Breakout builds on the movement in Asteroids, the grid in the Maze builds on the grid in Conway’s Life, and the acceleration in the Lunar Lander is one small step past the movement you already know.