Python sessions

Ten sessions in which you build a complete Pygame game every month. Every session has a worksheet, a cheatsheet and starter code to download.

  • Session 1: Catch the Stars: A star falls, you catch it. You write your first draw()/update() loop and move a sprite with the arrow keys.
  • Session 2: Dodge Meteors: Meteors spawn and fall. You keep track of them in a list, remove them once they are off screen and take off a life on every collision.
  • Session 3: Space Blaster: Enemies drop down, you shoot them. You create bullets with SPACE and detect collisions with a loop over a list.
  • Session 4: Pong: Two paddles, one ball. You learn pygame.Rect, make the ball bounce by reversing its speed and keep the score for two players.
  • Session 5: Breakout: Smashing bricks with a bouncing ball. You add sound effects with pygame.mixer and build a win and lose screen.
  • Session 6: Platformer: Jumping and falling on platforms. You simulate gravity with a vel_y variable and detect platform collisions with pygame.Rect.
  • Session 7: Bug Zapper: Bugs crawl, you zap them. You write your first class with __init__ and make a subclass through inheritance.
  • Session 8: Sky Highway: A flying ship on a scrolling road. You spawn obstacles from the right and raise the speed as the score goes up.
  • Session 9: Boss Battle: A boss with an HP bar and attack phases. You build a state machine that changes the shooting and movement behaviour per phase.
  • Session 10: My Game: No fixed assignment. You pick the genre and combine everything you learned in nine sessions into your own game.