Cambridge IGCSE 0478 · Cambridge AS & A Level 9618
Learn to program by building games
A programming book for IGCSE and A Level Computer Science. Start with a text adventure, then build ten complete arcade games in Python, one stage at a time.
10complete game series
140step-by-step stages, each one runnable
1,000+automated tests in the finished games
62chapters, from "Hello, World!" to A* search
Where do you start?¶
IGCSE, never programmed
IGCSE, some Python
A Level, never programmed
A Level, after IGCSE Computer Science
- Tools: chapters 0.5–0.8
- Chapter 32: the object-oriented Castle Adventure
- Part 2B: Common Core
- Part 2C to 2E: units, SQL, and the Paper 4 practical exam
The parts of the book¶
Part 0Tools of the TradeSet up Python, learn the command line, and keep your work safe with Git and GitHub. IGCSE students need 0.1–0.4 and 0.7; A Level students need all of Part 0.8 chapters
Part 1AStarting from Zero (IGCSE)For complete beginners. Text-only. Every chapter shows Python beside Cambridge pseudocode.6 chapters
Part 1BIGCSE CoreThe Cambridge IGCSE 0478 Paper 2 programming content, one chapter at a time, with the Castle Adventure growing alongside.15 chapters
Part 1CIGCSE Projects and Paper 2 ProgrammingBring everything together in a complete text game, and practise the programming questions in Paper 2.3 chapters
Part 1DBridge to A Level (after the IGCSE exams)Graphics arrive. Students set up pygame-ce and GitHub, build the first six stages of Rivet Rush, and meet OOP for the first time.4 chapters
Part 2AA Level Fast TrackFor A Level students who have not programmed before. IGCSE Computer Science students can start at Chapter 32 or Part 2B.5 chapters
Part 2BCommon CoreIdeas that every game series teaches. Each is explained once here, with examples from several series.8 chapters
Part 2CSignature UnitsEach unit is the stages only one series teaches. Start from the pack's previous stage folder, so you don't have to build the whole game.9 chapters
Part 2DSQL from PythonWriting SQL queries is programming, so it stays. Database theory is left to other resources.1 chapter
Part 2EThe Programming Project and Paper 2Plan, build and evaluate your own game, and practise the programming questions in Paper 2.3 chapters
AppendicesAppendicesReference material.5 chapters
The games¶
Every series is a complete game, built in fourteen stages. Each stage folder in its code pack runs on its own, so you can join at any stage.

Girder-climbing platformerRivet RushFirst principles: records, gravity and tile maps2D arraysState machinesInsertion sort

Invasion shooterLast BastionThe swarm and the bunkers are stored grids2D arraysBubble sort

Side-scrolling space shooterStar WardenA world that wraps round; a planet generated from a seedMODProcedural generationMerge sort

Top-down road chaseBlacktop PursuitA road generated ahead of you, held in a queueQueuesQuicksort

Formation shooterHornet SquadronCurved flight paths drawn by recursionRecursionSelection sort

Maze chaseCircuit CrawlerFour hunters: random, BFS, Dijkstra and A*GraphsPathfindingHeap sort

Scrolling platformerBramble RunA world stored in a hash tableHash tablesSpatial hashingMerge sort

Single-screen jetpack shooterRocket YardThe same game written procedurally and with classesOOPStacks

Mansion explorationHollow ManorSixty rooms as a graph, a tree and a binary search treeLinked listsTreesBacktracking

Single-screen mining platformerDeep SeamTwenty caverns squeezed into bits and bytesBitwiseCompressionThreads