Skip to main content

Python Game Development I: Intro to Game Dev with pygame-ce

Build, polish and share your first 2D games

About this course

Your first games in Python: the game loop, drawing, input, vectors and angles, images and sprites, collisions, sound and animation, ending with a capstone arcade game you put on the web for friends to play.

Who it is for: You finished an intro Python course (variables, loops, functions, lists, dictionaries) and want to make games. No classes needed yet: this course introduces them in the Vectors lesson, when your game objects first need them.

7three-hour modules
14lessons
21contact hours
22content hours (instruction + lab)

Before you start

This course assumes:

Setup: install Python 3.10 or newer, then run pip install pygame-ce 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 7-session instructor-led syllabus (PDF).

  1. Module 1: Your First Game Window (2.5 h)

    Open a window, run a real game loop with delta time, and draw shapes, colors and Surfaces.

  2. Module 2: Input & Screen Space (3 h)

    Read the keyboard, mouse and gamepads, and learn how screen coordinates, world coordinates and a camera offset relate.

  3. Module 3: Vectors & Angles (3.5 h)

    Move things with pygame.math.Vector2 and float positions, then aim, rotate and orbit with trigonometry.

  4. Module 4: Images & Sprites (3.25 h)

    Load and transform images, organize game objects as Sprite classes in Groups, and cut frames from sprite sheets.

  5. Module 5: Collisions & Sound (3.5 h)

    Detect and resolve collisions with Rects, FRects and circles, and add sound effects and music.

  6. Module 6: Animation & Capstone Kickoff (3.25 h)

    Animate sprites with dt-based frame timing, then design your capstone game and build its core loop.

  7. Module 7: Finish & Share (3 h)

    Polish and playtest your capstone, then put it on the web with pygbag and share a source zip.