Skip to content

Course Recap

This page collects the patterns and topics from all twelve games. For each one it shows where it is introduced, where it comes back, and which exam question it belongs to. It is a good starting point for exam preparation (see the project at the exam). Every session page also ends its material with a Summary table, which gives that session’s concerns and its answer to each.

Pattern Introduced in Also in Exam
Game Loop 01 Pong every game 1
Update Method 01 Pong every game 1
State (game states) 02 Flappy Bird most games from here 2
Singleton 02 Flappy Bird 3
Command 04 Sokoban 4
State (entities) 05 Pac-Man 06 Super Mario Bros, 07 The Legend of Zelda 2
Strategy 05 Pac-Man 06 Super Mario Bros 2
Observer 07 The Legend of Zelda 08 Angry Birds, 10 Pokemon, 11 Geometry Wars 5
Adapter & Facade 08 Angry Birds 7
Prototype 08 Angry Birds 8
Component 09 Plants vs. Zombies 11 Geometry Wars 9
Type Object 09 Plants vs. Zombies 10 Pokemon, 12 Vampire Survivors 8
State stack 10 Pokemon 11 Geometry Wars, 12 Vampire Survivors 2
Service Locator 10 Pokemon 3
Object Pool 11 Geometry Wars 10
Flyweight 11 Geometry Wars 10
Dependency injection 11 Geometry Wars 3
Spatial Partition 12 Vampire Survivors 7, 10
Data Locality 12 Vampire Survivors 10

Some ideas grow over several games. Following one thread is a good way to prepare an exam answer.

  • Game loop & time: the game loop (01) → fixed-tick movement (03) → tweening (07) → the physics step (08) → a fixed-timestep core (11). Exam 1.
  • Input: keyboard and mouse (02) → input as actions (03) → commands with undo (04) → picking (09). Exam 4.
  • Data: assets as data (03) → levels as data (04) → enemies as data (07) → prefabs (08) → game types as data (09) → save/load (10). Exam 8.
  • Entities: inheritance (06) → composition vs. inheritance (07) → components (09) → components vs. systems (11) → data-oriented design (12). Exam 9, 10.
  • Architecture: coupling and cohesion (02) → rules apart from drawing (04) → events (07) → a library behind our own interface (08) → what components cost (09) → where new code goes (11) → what speed costs (12). Exam 0.
  • Dependencies: Singleton (02) → Service Locator (10) → dependency injection (11). Exam 3.
  • Testing: rules apart from drawing, and unit tests (04) → ghost strategies tested one by one (05) → components tested on their own (09) → a save/load round trip (10) → fakes passed in through dependency injection (11) → the fast spatial grid checked against the slow, obvious search (12).
  • Collision: AABB (01) → circles, and what happens after a hit (03) → grid lookups (04) → tile collision (06) → hitboxes (07) → a physics library (08) → spatial partitioning (12). Exam 7.
  • Coordinate spaces: virtual resolution (01) → window to game coordinates (02) → world vs. camera (06) → physics units vs. pixels (08) → screen to grid (09).
  • Rendering: drawing & the content pipeline (01) → textures (02) → atlases, sprites & animation (03) → debug drawing (06). Exam 6.
  • Performance: the fixed timestep (01) → Object Pool and Flyweight (11) → profiling, spatial partitioning and data-oriented design (12). Exam 10.
  • GARCore: every game adds to the same core library. Each game’s README (in gar-games) lists what is new in GARCore since the previous game.