Overview
Drift Race is a top-down arcade drifting game made with Python and pygame-CE. It's focused on the feel of drifting: sliding through corners, linking turns, and bumping into friends or AI on small stylized tracks. Simple to pick up, but with physics that give you room to learn and improve.
What it is
- A fast, drifty driving game with handling based on real physics, but tuned to be fun first
- Local play, easy host/join multiplayer via relay, with optional AI opponents
- Clean, readable visuals: smooth camera tracking, light cones, tire marks, and distinct car sprites
- A developer-friendly build with live FPS, debug overlays, and quick toggle options.
Highlights
Real drift feel
- Tire forces driven by wheel sliding, with smooth transitions in and out of drifts
- Tire marks that fade from smoke into rubber laid onto the track
- Collision handling that feels responsive without interrupting the flow of driving
Multiplayer that just works
- Host a room, share a short join code, and drive together through a relay
- Client→server updates at 60 Hz for responsive sync
AI drivers
- Spawn AI with a keypress (host only)
- Path-finding and per-frame control logic with optional debug visuals
Punchy engine audio
- Layered sounds for intake, engine, exhaust, gear shifts, and turbo blow-off
- Audio mixer designed to keep everything smooth and low latency
Car types and sprites
- Switch between 6 current cars in-game
- Separate sprite layers for shadows, car body, and headlights, updated dynamically for smooth visuals
Built-in tools
- FPS display in the top-right
- Debug mode (per-wheel forces, overlays) via button or F3
- Light toggle, reset, and quick AI spawn
Gameplay
Drifting is quick and easy to pick up, and it still feels satisfying even on a keyboard. The track is defined by clear borders, the camera follows smoothly, and focused light cones help you stay oriented. Tire marks change based on how you drive, from smoky slides when you lose control to clean rubber lines when you hit every turn just right.
Controls
Controls are customizable in settings
- Drive: Arrow keys or ZQSD
- Brake: Space
- Reset car: R (on error screen)
- Lights on/off: L
- Toggle debug: F3
- Host/Join room: H / J
- Spawn AI: N
- Settings/Escape: Esc
Tech notes
- Python 3.12 + pygame-ce
- SAT-style collision checks; camera with clamped subsurfaces
- Threaded audio engine with dynamic mixing and gear events
- Asset system with per-car sprite stacks (shadow/diffuse/headlight)
- Network: lightweight state sync with relay keepalive and rate caps
Status and roadmap
Current: Playable with local, AI, and online rooms; 6 car models; one map.
Next ideas: More map and car types, game modes, mod support.
Want to try it or contribute? The project is open, lightweight, and easy to run.