8000 GitHub - ariaesm/pygame: Race Car: a small Pygame arcade game where you dodge falling blocks. · GitHub
[go: up one dir, main page]

Skip to content
ariaesmPublic

About

Race Car: a small Pygame arcade game where you dodge falling blocks.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Race Car — a Pygame dodging game

A small 2D arcade game written with Pygame: drive the car left and right and dodge the falling blocks. Every block you pass raises your score, and the blocks fall faster every 5 points. Hitting a block or the edge of the road ends the run.

Features

  • Start menu with clickable Play / Quit buttons
  • Increasing difficulty: obstacle speed goes up every 5 blocks dodged
  • Background music and a crash sound effect
  • Live "Dodged" score counter

Getting started

Requires Python 3.8+.

git clone https://github.com/ariaesm/pygame.git
cd pygame
pip install -r requirements.txt
python race_car.py

Controls

Key Action
← / → Move the car
Mouse Click the menu buttons

Project structure

race_car.py      # game loop, rendering, collision detection
assets/
  car.png        # player sprite
  music.ogg      # background music
  crash.wav      # crash sound

How it works

The game runs a classic loop at 60 FPS: read input → update the car and obstacle positions → check for collisions with simple rectangle overlap → redraw the screen. When the obstacle leaves the screen it respawns at a random x position and the score goes up; every fifth point the fall speed increases.

License

MIT

About

Race Car: a small Pygame arcade game where you dodge falling blocks.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0