A 3D retro-synthwave endless racer built from scratch in Python using the Panda3D game engine. The player controls a hover-ship, speeds down a glowing neon grid, dodges red obstacles (by steering or jumping), and collects green energy cells to rack up points and speed.
This project is structured specifically to showcase clean game architecture, low-level engine integration, procedural asset generation, and best practices in Panda3D.
- Endless Procedural Road: Smoothly scrolling road segments that recycle dynamically once they pass the camera view.
- Dynamic Physics & Steering: Smooth lateral ship movement with inertia interpolation, horizontal banking (roll rotation) while turning, and vertical jumps affected by gravity.
- Polished Synthwave Atmosphere: Custom ambient and directional lights, fog-of-war depth fade for horizon blending, and emissive neon materials.
- Responsive DirectGUI UI: Retro-themed Start Menu, Game Over Screen, and live HUD tracking Speed, Distance, and Score.
- Self-Contained Sound & Textures: A procedural generator compiles all audio (.wav sounds, loops) and textures (.png) programmatically, keeping the repository 100% lightweight and runnable out-of-the-box.
Hiring teams reviewing this repository will see implementations of key Panda3D and game development patterns:
- Standardized scene graph traversal and structure.
- Separation of game entities onto logical paths (e.g.,
game_rootcontainer which can be cleared or repositioned instantly). - NodePath inheritance, transformations, scale manipulations, and visibility controls (
show(),hide()).
- Renders 3D meshes (the hover ship, obstacles, and diamonds) dynamically in RAM using Panda3D's C++ rendering buffers:
GeomVertexFormatdefining custom vertex layouts (Position, Normal, Color).GeomVertexDatawriting data to graphics buffers usingGeomVertexWriter.GeomTrianglessetting face indices with custom winding orders to leverage GPU backface culling.
- Eliminates dependency on heavy
.bamor.eggasset downloads, keeping the codebase fully self-contained.
- Implements Panda3D's collision architecture:
- From Colliders: Active collision bodies (player ship has a
CollisionSphere). - Into Colliders: Passive collision bodies (barriers have a
CollisionBox; cells have aCollisionSphere).
- From Colliders: Active collision bodies (player ship has a
- Uses collision bitmasks (
setFromCollideMask,setIntoCollideMask) to optimize performance and restrict check queries. - Utilizes
CollisionHandlerEventwith pattern matching (%fn-into-%inmapping to'player-into-obstacle'and'player-into-gem') to leverage Panda3D's event loop, keeping collision handling decoupled from frame tick updates.
- Employs
base.taskMgrto hook into the main thread game loop. - Uses frame-rate independent calculation (
dt = globalClock.getDt()) to compute movement and gravity, ensuring consistency on high-refresh-rate monitors. - Employs Key Polling (
base.mouseWatcherNode.isButtonDown) rather than keyboard event interrupts for player movement, which provides smooth, fluid player control.
- Tailors Panda3D rendering properties globally using a Page Resource Configuration file:
- Multi-sample anti-aliasing (MSAA) for smooth edges.
- Window frame metrics (
show-frame-rate-meter). - Audio mixer parameters (OpenAL driver).
synth_runner/
│
├── config.prc # Engine settings (antialiasing, window size, title, audio library)
├── main.py # Main application class (ShowBase), camera, lighting, and game loop
├── game_state.py # State machine coordinating game phases (MENU, PLAYING, GAMEOVER)
├── player.py # Procedural 3D hover-ship model, inputs, gravity jump, and visual banking
├── track.py # Procedural road scroller, obstacle generator, and obstacle recycler
├── collision_mgr.py # Collision traverser, collision solids, and event handlers
├── ui.py # High-tech DirectGUI retro overlays and live gameplay HUD
├── audio_mgr.py # Audio loader, background music looper, and SFX player
├── gen_assets.py # Script generating wav audio and textures programmatically
└── README.md # Documentation (This file)
Make sure you have Python 3.10+ installed.
Install the required packages (panda3d for the game engine and pillow for texture generation):
pip install -r requirements.txt(If you don't have a requirements.txt yet, simply run pip install panda3d pillow)
Run the generator script to compile the textures and audio files in your local workspace:
python gen_assets.pyThis generates:
- Sound effects:
assets/audio/collect.wav,assets/audio/crash.wav,assets/audio/music.wav - Textures:
assets/textures/grid.png,assets/textures/starfield.png
Start the game:
python main.py- A / D or Left / Right Arrow: Steer the hover-ship left and right.
- Spacebar or Up Arrow: Jump over low red barriers.
- Goal: Collect green energy cells for points and speed boosts while steering clear of red walls and pillars!