DEV Community

Cover image for Racing Game with Python + Pygame ๐Ÿš—
Vida Khoshpey
Vida Khoshpey

Posted on

Racing Game with Python + Pygame ๐Ÿš—

๐ŸŽ๏ธ I Built a Retro Racing Game with Python + Pygame โ€” Let's Improve It Together!

Hi everyone! I'm excited to share a fun personal project I built recently: a retro-style 2D racing game made with Pygame.

It's called ๐ŸŽฎ Atari Speed Racer, and it brings back those classic vibes of dodging traffic at high speeds!

Game Preview

๐Ÿ‘‰ Watch full gameplay video


๐Ÿš€ What I Built

Start Screen

This is a beginner-friendly Python project that features:

  • ๐Ÿš— Multiple car types with different speeds and designs
  • ๐Ÿ›ฃ๏ธ Dynamic road generation with lane markers
  • ๐Ÿ“ˆ Progressive difficulty
  • ๐Ÿ† High score saving system
  • ๐ŸŽต Music effects (can be disabled in CI via GitHub Actions)
  • ๐Ÿ–ฅ๏ธ Smooth gameplay at 60 FPS

You can run it locally like this:

pip install pygame==2.6.1 python atari.py 
Enter fullscreen mode Exit fullscreen mode

Or check out the source code here:

๐Ÿ”— GitHub Repo


๐Ÿง  Why I Made It

As a self-taught developer, I wanted to:

Improve my Python skills through building games

Learn GitHub Actions (yes, it even runs headless on CI!)

Create something visually fun and interactive

Work on a real project with room to grow


๐Ÿค Letโ€™s Build This Together!

Iโ€™m looking for fellow devs or learners who want to collaborate on this game for fun:

๐Ÿ’ก Ideas welcome:

Adding different environments (snow, night, desert...)

Multiplayer mode?

Leaderboard via web API

UI redesigns or animations

Whether you're a designer, programmer, or just curious โ€” Iโ€™d love your feedback, ideas, or PRs.


๐Ÿ—‚๏ธ Quick Glance at Project Structure

Racing-car-game/
โ”œโ”€โ”€ atari.py # Main game logic
โ”œโ”€โ”€ highscore.txt # Stores persistent high score
โ”œโ”€โ”€ music/ # Music & sound effects
โ”œโ”€โ”€ screenshots/ # Screenshots and previews
โ”œโ”€โ”€ requirement.txt # Dependencies
โ””โ”€โ”€ README.md # Project overview


๐Ÿ“ฅ Want to Contribute?

Game Screen

๐Ÿงช Feel free to fork it, test it, and open a pull request!

๐Ÿ‘‰ GitHub Repo


๐Ÿง About Me

Hi, I'm Vida, a self-taught developer passionate about Python, web dev, and creative coding. I love learning by doing โ€” and sharing it along the way.

Letโ€™s make something awesome together!


โœจ Thanks for reading โ€” let the race begin! ๐Ÿ


Top comments (3)

Collapse
 
yaldakhoshpey profile image
Yalda Khoshpey

๐Ÿ˜๐Ÿ˜๐Ÿ˜

Collapse
 
aquascript-team profile image
AquaScript Team

We are always with you to collaborate

Collapse
 
aquascript-team profile image
AquaScript Team

Really cool, Are you not using discord or Gmail?