Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coddy

Make Games with Pygame

via Coddy

Overview

Make five games in Python with pygame: move a square, catch falling blocks, Snake, two-player Pong and a game of your own. Every game runs in your browser as you write it.

Prerequisites:

  • Python basics: variables, if, loops, functions, lists and tuples.

Syllabus

The Game Loop

  • Open a Window
  • Fill the Background
  • Draw a Square
  • The Clock
  • Arrow Keys
  • Sprint
  • Stay on Screen
  • Reach the Goal

Events and Collisions

  • The Basket
  • A Falling Block
  • Random Drops
  • Catch It
  • Keep Score
  • Lives
  • Win or Lose
  • Pause
  • Play Again
  • Faster Over Time

Grids and Lists

  • A Grid of Cells
  • Step by Step
  • Turn With the Arrows
  • No U-Turns
  • A Body List
  • Food
  • Eat and Grow
  • Walls
  • Don't Bite Yourself
  • Levels

Two Players and a Ball

  • The Ball
  • Bounce
  • Two Paddles
  • Hit the Paddle
  • Back to the Middle
  • Scoreboard
  • Serve
  • Angle Shots
  • First to Five
  • A Ball Class

Make It Yours

  • Start Your Game
  • Finish Your Game

Reviews

Start your review of Make Games with Pygame

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.