Skip to main content

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).

14three-hour modules
27lessons
42contact hours
46.75content hours (instruction + lab)
1optional reading

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).

  1. Module 1: Engine Architecture (3.5 h)

    Structure large games with an entity-component-system and a decoupled event system.

  2. 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.

  3. 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.

  4. Module 4: Decision AI (3.5 h)

    Build reactive behavior trees with a blackboard, then score options with utility AI and hysteresis.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. Module 10: Real-time Multiplayer (3.5 h)

    Hide latency with client prediction, reconciliation and interpolation, then make hits fair with lag compensation.

  11. 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.

  12. 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.

  13. Module 13: Balance & Testing (3 h)

    Tune difficulty with dynamic adjustment that respects the player, then run playtests and read telemetry honestly.

  14. Module 14: Capstone Studio (3 h)

    Build, playtest and ship a polished game that uses at least two Advanced systems.