Python Game Development III: Advanced Game Dev
Engine architecture, GPU rendering, AI and multiplayer
About this course
Engine-level game programming in Python: ECS and events, profiling and robust saves, steering, behavior trees and utility AI, procedural dungeons and WFC, physics engines with pymunk, moderngl shaders, lighting and post-processing, adaptive audio, sockets through client prediction and matchmaking, genre studies, balance and telemetry, and a studio capstone.
Who it is for: You finished Game Dev II and Intermediate Python (dataclasses, ABCs, typing, file I/O).
Before you start
This course assumes:
New Python features are taught where they are first needed, in short “Python sidebar” boxes:
- numpy primer (L13)
Setup: install Python 3.10 or newer, then run pip install pygame-ce moderngl numpy pymunk in a terminal. Lesson 1 walks through it.
Modules
Each module is one three-hour session: instruction, guided practice and a lab you can finish at home. Teaching it in a classroom? See the 14-session instructor-led syllabus (PDF).
-
Module 1: Engine Architecture (3.5 h)
Structure large games with an entity-component-system and a decoupled event system.
- Lesson 1: Entity-Component-System 2 h
- Lesson 2: Event Systems 1 h 30 min
-
Module 2: Performance & Robust Saves (3.25 h)
Measure before you optimize with cProfile and perf_counter, then harden save files with checksums, versioning and safe formats.
-
Module 3: Movement AI (3.25 h)
Steer agents with seek, flee, arrive and flocking forces, then go beyond basic A* with weighted search, JPS and flow fields.
- Lesson 5: Steering & Flocking 2 h
- Lesson 6: Advanced Pathfinding 1 h 15 min
-
Module 4: Decision AI (3.5 h)
Build reactive behavior trees with a blackboard, then score options with utility AI and hysteresis.
- Lesson 7: Behavior Trees 2 h
- Lesson 8: Utility AI 1 h 30 min
-
Module 5: Procedural Worlds (3.5 h)
Generate dungeons with BSP and caves with cellular automata, then tile worlds with a real wave function collapse.
-
Module 6: Physics Engines (3.5 h)
Collide rotating convex polygons with SAT and angular impulses, then build a small physics engine and compare it with pymunk.
- Lesson 11: SAT & Rotational Collisions 1 h 45 min
- Lesson 12: Build a Physics Engine (+ pymunk) 1 h 45 min
-
Module 7: GPU Rendering (3.5 h)
Render with the GPU through pygame-ce and moderngl: buffers, shaders, uniforms and textures, then framebuffer post-processing.
- Lesson 13: moderngl Foundations 2 h
- Lesson 14: Post-processing 1 h 30 min
-
Module 8: Atmosphere (3.25 h)
Light 2D scenes with lightmaps and normal-mapped sprites, then make audio adapt with numpy DSP and layered music.
- Lesson 15: 2D Lighting 2 h
- Lesson 16: Adaptive Audio & DSP 1 h 15 min
-
Module 9: Networking Foundations (3.25 h)
Learn topologies, latency and TCP vs UDP with a first echo server, then frame messages and handle many clients safely.
- Lesson 17: Sockets, TCP & UDP 2 h
- Lesson 18: Framing & Concurrency 1 h 15 min
-
Module 10: Real-time Multiplayer (3.5 h)
Hide latency with client prediction, reconciliation and interpolation, then make hits fair with lag compensation.
- Lesson 19: Client Prediction & Reconciliation 2 h
- Lesson 20: Lag Compensation 1 h 30 min
- Optional reading: State Sync & Bandwidth not counted in hours
-
Module 11: Lobbies & Matchmaking (3.25 h)
Build a lobby server and client on the framing layer, then match players with skill windows and Elo ratings.
- Lesson 21: Lobby Server & Client 2 h
- Lesson 22: Matchmaking & Ratings 1 h 15 min
-
Module 12: Genre Studio (3.5 h)
Study two demanding genres: arcade racing physics, and a real-time strategy game with per-faction economies, octile A* and a small event bus.
- Lesson 23: Racing Physics 1 h 30 min
- Lesson 24: Real-time Strategy 2 h
-
Module 13: Balance & Testing (3 h)
Tune difficulty with dynamic adjustment that respects the player, then run playtests and read telemetry honestly.
- Lesson 25: Difficulty & DDA 1 h 30 min
- Lesson 26: Playtesting & Telemetry 1 h 30 min
-
Module 14: Capstone Studio (3 h)
Build, playtest and ship a polished game that uses at least two Advanced systems.