Menu
CoddyTech
NewJourney

Learn Pygame: Make Games in Python

A free, interactive pygame course that starts from zero. Write Python and play your games beside the editor on the real pygame-ce, with art and sound from Kenney's free packs, AI hints and a certificate per section.

1,000+ codders enrolled

218 lessons218 challenges387 quiz questions

  • Beginner friendly
  • sparkles iconAI-assisted coding help
  • hint iconHands-on interactive lessons
  • volume On iconAudio narration on every lesson
  • quiz iconQuizzes to test your knowledge
  • certificate iconFree certificate of completion

Syllabus

7 sections12 projects218 lessons218 challenges387 quiz questions
  1. Start sectionStartExpandCollapseLearn Python by drawing in a pygame window: variables, if, loops, functions and lists, each one moving something on screen. You finish with Night Sky, stars you place and that twinkle.

    Your First Window

    4 lessons4

    Numbers and Variables

    5 lessons55

    If and Keys

    5 lessons55

    Loops That Draw

    5 lessons55

    Functions

    4 lessons45

    Lists of Things

    5 lessons55

    Night Sky

    Project4 lessons4
  2. Start sectionStartExpandCollapseWrite the game loop yourself: the clock, keys, shapes, the mouse, movement measured in seconds, Rects and collisions, score and lives. You build Gem Hunt and finish with Catch the Blocks.

    Move a Square

    Project8 lessons85

    Shapes and Colors

    4 lessons45

    The Mouse

    Project5 lessons55

    Moving by Time

    5 lessons55

    Catch the Blocks

    Project10 lessons105
  3. Start sectionStartExpandCollapseLoad images, turn and scale them, write classes for game objects, group them as sprites and animate them from sprite sheets. You finish with Star Patrol, a space shooter.

    Loading Images

    5 lessons59

    Turn, Flip, Scale

    4 lessons49

    Classes for Game Objects

    6 lessons613

    Sprites and Groups

    5 lessons512

    Pixel-Perfect Collisions

    4 lessons49

    Animation from Sprite Sheets

    4 lessons48

    Star Patrol

    Project8 lessons817
  4. Start sectionStartExpandCollapseMenus and game over screens, a HUD, timers and waves, difficulty and a saved high score. You finish with Sky Runner, an endless runner.

    Game States

    5 lessons512

    Text and a HUD

    4 lessons48

    Timers and Waves

    5 lessons512

    Difficulty

    4 lessons48

    High Score

    4 lessons48

    Sky Runner

    Project7 lessons716
  5. Start sectionStartExpandCollapseBuild levels from text maps and tiles, add gravity and jumping, land on platforms, follow the player with a camera and add enemies that patrol. You finish with Moss Caves, a platformer.

    Maps from Text

    5 lessons510

    Tiles

    4 lessons410

    Gravity and Jumping

    5 lessons515

    Platform Collisions

    5 lessons510

    A Scrolling Camera

    4 lessons410

    Enemies That Patrol

    4 lessons410

    Moss Caves

    Project8 lessons817
  6. Start sectionStartExpandCollapseSound effects, music, particles, screen shake, hit flashes and smooth motion, then use them all to polish Star Patrol.

    Sound Effects

    4 lessons49

    Music

    3 lessons35

    Particles

    4 lessons49

    Screen Shake and Hit Flash

    4 lessons49

    Smooth Motion

    4 lessons49

    Polish Star Patrol

    Project4 lessons49
  7. Start sectionStartExpandCollapseMake Snake, two-player Pong and Rune Keep, a top-down dungeon, then design a game of your own.

    Snake

    Project10 lessons1020

    Pong for Two

    Project10 lessons1020

    Rune Keep

    Project9 lessons920

    Make Your Own Game

    Project2 lessons24

Pygame courses

Hands-on Pygame courses, free to start in your browser.

What you get
Everything you'll use to learn to code

Learn by Doing

Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.

playground.js
Code Editor
1const greeting = "Hello, Coddy!"
2function sayHi(name) {
3    return greeting + " " + name
4}
5
bottombar Collapse icon
Test #1test Case Success icon
Test #2test Case Success icon
Test #3test Case Failure icon
Input
"Alex"
Output
"Hello, Coddy! Alex"

Build Your Streak

Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.

12 days streak

Return tomorrow to keep your streak!

fire Filled icon
left icon

January 2026

right icon

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

21

22

23

24

25

26

27

28

29

30

product Double Or Nothing icon

Double or Nothing

Day 5 of 7

fire Freeze icon

Streak Freeze

2 left

You're Not Alone

Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!

Challenger League
Challenger LeagueTop 7 advance
leaderboard First icon1
avatar 1 icon
fire Filled icon
Alex7+ Days
2840
leaderboard Second icon2
avatar 2 icon
fire Filled icon
Jordan7+ Days
2650
leaderboard Third icon3
avatar 3 icon
fire Filled icon
Sam7+ Days
2420
4
avatar 4 icon
Casey
2180
5
avatar placeholder icon
fire Filled icon
Morgan7+ Days
1950
leaderboard Arrow Up iconPromotion zoneleaderboard Arrow Up icon

Every way to learn

Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.

Intro to Variables
Audio

A variable is a named container that stores a value you can reference later in your program.

In Python, you create one by writing the name, an equals sign, then the value you want to store.

The value can change over time. Reassigning the name simply points it to a new value.

1xSarah

Earn a Certificate

Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.

CoddyCertificate of Completion
This certifies thatJohn Doehas successfully completed
python iconPython Fundamentals
Verified
DateJan 2026
LinkedInAdd to LinkedIn

Why learn pygame with Coddy

  • Your code and your game sit side by side. Press Play and the game runs on pygame-ce, the real library, compiled for the web. The keyboard and mouse reach the game, print() and every error show in the Console, and Check grades the lesson by playing your game.
  • No Python needed to start. The first section teaches variables, if, loops, functions and lists inside a game window, and ends with a night sky of stars you place. Know Python already? Start at section 2.
  • The game loop the way you would write it at home: while running:, pygame.event.get(), clock.tick(60), keys and the mouse, Rect collisions, score, lives and restart, ending with a catching game.
  • Sprites with real art: images, sprite sheets and animation, classes for game objects and sprite groups, in a space shooter. Then game rules in an endless runner (menus, a HUD, timers, waves and a high score), and tile maps with gravity and a scrolling camera in a platformer.

Frequently asked questions about learning pygame

What is pygame?

pygame is a free Python library for making 2D games: it opens a window, draws shapes and images, plays sounds and reads the keyboard and mouse. This course uses pygame-ce, the community edition, which you still load with import pygame.

Do I need to know Python to learn pygame?

No. The first section teaches the Python a game needs inside a game window: variables, if, loops, functions and lists. If you already know Python, start at section 2. For Python on its own, take the Python course.

Is this the real pygame?

Yes. Your game runs on pygame-ce 2.5.7 compiled for the browser, and Check grades it with the same library on our server. The code is ordinary pygame: install it on your computer with pip install pygame-ce and the same program runs there.

What games will I make in this pygame course?

Each section ends with a game: a night sky of stars, a catching game, a space shooter, an endless runner and a platformer. The last section builds Snake, two-player Pong, a top-down dungeon game and one of your own design.

Can my games use images and sounds?

Yes. The lessons come with sprites, tiles, fonts and sounds from Kenney's free packs, which your code loads with pygame.image.load and pygame.mixer. Uploading your own files is not supported yet.

Is the pygame course free?

Yes. The lessons, the games, the AI hints and the certificates are free. A free account works through a few lessons a day, and Pro removes the daily limit.

Do I get a certificate for the pygame course?

Yes. Each of the 7 sections gives you a free certificate of completion when you finish it, with its own page you can share or add to LinkedIn.

Learning paths that include this course

This course is one step of a longer path: several courses in the order a mentor would teach them, each with its own free certificate.

Coddy programming languages illustration

Learn Pygame with Coddy

Get started