🎮 My First Python Game â€ĸ Episode 5 of 7 â€ĸ See All Episodes
🎮 Episode 5 â€ĸ Improver â€ĸ Arcade Classic

Brick Storm!
Breakout

Paddle, ball, wall of bricks, the 1976 classic in Pygame. Bounce physics, paddle spin, rows of bricks from nested loops, lives and a win state. Part 2 next episode adds power-ups!

🎮 Ages 10+ 🎮 ~1.5 Hours 🎮 Python ✓ Free
🎮 Paddle ? Bounce physics 🎮 Brick grid 🎮 Paddle spin 🎮 Lives 🎮 Win state
⭐
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-breakout-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 Breakout 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 paddle, a bouncing ball and a wall of bricks
🎮
What you just learned:
  • Building a paddle that clamps to the screen edge with held-key input
  • Ball velocity vectors and wall-bounce physics (flip the component on collision)
  • Paddle spin: offsetting the rebound angle based on where the ball hits the paddle
  • Nested for loops to generate a grid of bricks with row-based colouring
  • Lives, scoring by row depth, and a win state when all bricks are destroyed
🎮🎮🎮🎮?
Workshop Complete!
The arcade classic rebuilt in Python. Keep your code safe, Episode 6 upgrades THIS game with power-ups, multi-ball and levels!
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
🎮-🎮 Episode 6: Breakout Part 2 ?
⭐ 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 Breakout 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 →