A retro-style 2D bike physics game with neon glow and real-time procedural tracks.
Inspired by the classic Gravity Defied for old-school mobile phones ๐ฑ.
Gravity Defied - Neon Edition is a side-scrolling motorcycle game where you ride across bumpy terrain, perform flips, and try to reach the finish line without crashing ๐ฅ.
โจ Features:
- Procedurally generated levels ๐ (never the same!)
- 3 difficulties: Easy, Medium, Hard ๐ง
- Real physics engine ๐งฒ
- Neon visuals on a dark background ๐
- Perform air flips for speed boosts ๐
- Choose from 3 different bikes ๐ต
- Timer + level tracking โฑ๏ธ
- 20 total levels to beat ๐ฏ
- ๐ง Choose difficulty
- ๐๏ธ Select your bike
- Use your keyboard to ride and survive!
| Key | Action |
|---|---|
A / โ |
Lean left / rotate left |
D / โ |
Lean right / rotate right |
R |
Restart level |
N |
Next level (after win) |
ESC |
Quit |
Ride carefully - you can crash if you tilt too much or land badly!
- Python 3.8+
- pygame (
pip install pygame)
Clone the repository and run the main game script:
git clone https://github.com/Antot-12/Gravity-Defied.git
cd Gravity-Defied
python gravity_defied.py-
Uses pygame for rendering and input.
-
Physics is written from scratch using basic Newtonian mechanics:
- Gravity
- Torque (for flips)
- Ground collision
- Velocity and damping
-
Tracks are generated using random slopes and spline-like polylines.
-
The game camera follows the bike smoothly.
-
Bike reacts differently on the ground vs in air.
