🎮 My First Python Game â€ĸ Episode 3 of 7 â€ĸ See All Episodes
🎮 Episode 3 â€ĸ Beginner+ â€ĸ Builds on Episodes 1-2

Stay Alive!
Dodge & Collect

Gems rain down, so do bombs. Grab the good, dodge the bad, chase a high score. You will master lists of moving objects, spawn timers, and difficulty curves.

🎮 Ages 10+ 🎮 ~1.5 Hours 🎮 Python ✓ Free
🎮 Lists of objects 🎮 Spawn timers 🎮 Weighted random 🎮 Hazards 🎮 Difficulty curve 🎮 High score
⭐
0 XP
Level 1
🎮0
Your Progress 0 / 6 steps
đŸ› ī¸
Build it in our Python Studio too: lay out a level on a grid, tick the Pygame features and download a real main.py you can run, right in the browser with no install. Open the Python Mod Studio →
đŸ“Ļ
Reference project: download the finished code files used in this workshop: âŦ‡ python-dodge-workshop-reference.zip. Every code block also has a Copy button.
đŸ’ģ
How to run: Save your file and run python game.py in your terminal.
🎮
Need the game setup? Each episode builds a new game on the same "usual template", import pygame, pygame.init(), the window and the while running game loop. If you're starting here or need that template, grab it in one click: Episode 1 full template ? â€ĸ Python Cheatsheet ?
🌐
How it works: write the Python in each step, and the canvas on the right shows what your code does. It is a live preview that maps Pygame ideas to a playable game. Type to see it update, or press Apply to Canvas to test it straight away.
đŸĻŠ
Lumo says: every step adds one feature to the same game. Type a little, click Apply to Canvas, and test it straight away. There is no wrong answer you can't undo.

Build Dodge & Collect Step by Step

Each step adds one feature. Write the code, watch it come alive in the canvas, then make it your own.

Step 1 / 6
A runner dodging falling bombs and grabbing gems
🎮🎮🎮🎮?
Workshop Complete!
Spawn timers, object lists and a difficulty curve, you built a proper score-chaser. Episode 4 slows things down with a maze to solve.
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
🎮-🎮 Episode 4: Maze Explorer ?
⭐ View My Progress & Certificates

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi
🐍 Build Dodge and Collect in the Python Studio Pick the game in the browser, tune it, play it live, then download a runnable Pygame project with real Python code. No install. Open the Studio →