All projects
Three.js · Cannon-es
Keep Pushing
2025Game · Physics · 3D · WebGL
Keep Pushing is a 3D racing game built with Three.js as part of the Computer Graphics course. The game combines real-time rendering, physics-based interaction, and procedural content generation. Players control a car using keyboard input and aim to complete the track in the shortest time possible while avoiding obstacles.
This project strengthened my skills in Three.js rendering, physics simulation, procedural generation, and performance optimization, and provided hands-on experience building an interactive 3D racing experience.
Key features & challenges
- Looping, procedurally generated track built with a Catmull–Rom spline, so every load produces a unique race layout.
- Dynamic environment loading — trees spawn only near the car and are removed when far away, keeping forest density consistent and performance stable.
- Randomly generated obstacles that appear ahead of the car at random positions and orientations, then despawn once outside the active range.
- Physics-based vehicle control using Cannon-es RaycastVehicle, with speed falling off when the car leaves the road.
- Polished UI including a minimap, countdown, speedometer, RPM gauge, and visual crash indicators.
My contributions
- Implementing vehicle physics using RaycastVehicle
- Configuring collision bodies and material properties
- Implementing off-road speed reduction logic
- Loading car and obstacle 3D models (OBJ/FBX/GLTF)
- Creating the random obstacle spawning system
- Building the dynamic tree generation and cleanup system
- Implementing infinite terrain by repositioning the grass mesh
- Building the minimap UI using canvas drawing functions