Programming Through Games
OCR GCSE J277 · OCR A Level H446

Learn Python by building games

One course, from your first line of Python to the A Level programming project. Pick a game: its edition teaches the whole GCSE course while you build it, one chapter at a time, and then the A Level course with ten complete arcade games.

The books are for members: log in with the account your teacher gave you. Free to read now: the start of the book, Part 0 and Chapter 1.

11editions of the book
10arcade games to build
22steps in every text game
14stages in every game series
HOW IT WORKS

Start from zero. Finish at A Level.

Every edition is a complete book in four parts. Only Part 1 changes from edition to edition: that is where you build your game.

PART 0

Tools of the trade

Install Python and an editor, use the command line, and keep your work safe with Git and GitHub.

PART 1 · OCR GCSE J277

A text game grows with every chapter

Each chapter teaches one part of the GCSE course, from printing a title screen to sorting a hall of fame, and adds it to your game. After 22 steps it is complete: data loaded from files, a database of items, saved games, tests and a capstone project.

BRIDGE TO A LEVEL

Then the graphics arrive

After the GCSE exams, rebuild the first six stages of your game with pygame-ce: a window, a game loop and sprites. (The Castle Adventure edition builds Rivet Rush.)

PART 2 · OCR A LEVEL H446

Ten arcade games, fourteen stages each

Graphs and pathfinding, recursion, hash tables, object-oriented programming and the programming project, each taught through the game that needs it.

APPENDICES

Look it up

Exam Reference Language, A Level pseudocode, the command line and Git, pygame-ce, and a glossary.

FOR TEACHERS

Teacher editions

Every edition has a teacher edition with the answers and mark guidance, for teacher accounts. Teachers' area →

SAME CHAPTERS, ANY GAME

One class, many games

The chapters and their numbers are the same in every edition, so each student can build a different game in the same lesson.

THE EDITIONS

Which game will you build?

Each edition is a complete book. Read it online, or download it as a PDF.

#01
Text adventure

Castle Adventure

A text adventure: explore a castle, fight its creatures, and defeat the Dark Lord.

Text onlyOOP at A Level
Jump to a partPart 0: toolsPart 1: GCSEBridge to A LevelPart 2: A LevelAppendices

No edition matches that. Try another word, or press All.

CODE PACKS · FOR MEMBERS

Download the code

The finished code for every step and every stage, as zip files: open a zip, then open the folder for the step or stage you are on. You need to be logged in to download them.

THE BOOK'S OWN CODE

Book code

Every step of every edition's Part 1 game (code/gcse/<game>_text/step_01 to step_22), the graphical versions for Chapters 25–27 (<game>_gcse), the Castle Adventure, the mini-games and capstones, and the Part 2 examples (code/alevel).

Download the book code · 5.5 MB
A LEVEL · ONE PACK PER GAME

Game series code packs

One folder per stage (stage_01 to stage_14), each a finished, working program: start a stage from the previous stage's folder, or catch up by copying the next one.

FOR TEACHERS · TEACHER ACCOUNTS

The teacher editions

Answers, mark guidance, the bug hunts and how to hand out the code, for every edition. Log in with a teacher account to open them; to have one, get in touch.

THE COMPLETE COLLECTION

Every edition in one book

Part 0, Part 2 and the appendices are the same in every edition, so the collection prints them once. Part 1, the GCSE course, is printed for every edition, with its own Chapter 31, after an introduction that explains how to use them together.

  • 11editions
  • 3,820pages
  • 43 MBPDF
  • 1file, with bookmarks for every chapter
⬇ Download the complete collection