A 3D racing game developed with Java, Processing and GLSL as part of a Computer Science project at Université Paris-Saclay.
The project combines 3D graphics, mathematical modeling, vehicle movement, collision detection and real-time rendering.
- 3D racing track generated using Bézier curves
- Vehicle acceleration, braking and friction
- Opponent vehicles
- Collision detection and response
- Multiple camera perspectives
- Day and night modes
- GLSL fragment shader for atmospheric fog
- Textured skybox and procedural road texture
- Real-time minimap
- Lap counter, timer and race ranking
- Interactive heads-up display (HUD)
| Technology | Purpose |
|---|---|
| Java | Game logic and algorithms |
| Processing | Real-time 3D rendering |
| GLSL | Atmospheric fog shader |
| PGraphics | Minimap rendering |
| OBJ / MTL | 3D vehicle model |
| Bézier curves | Track geometry |
The racing track is generated from a set of 3D Bézier control points. Each curve is sampled to create a detailed closed circuit with elevation changes.
Vehicle positions are calculated using a progress parameter along the track and a lateral offset. The movement system includes acceleration, braking, friction and collision response.
The camera follows the player's position and orientation along the track. Players can switch between different camera perspectives during the race.
The environment uses textured skyboxes, procedural asphalt textures, dynamic lighting and a GLSL fragment shader to simulate atmospheric fog.
The game includes a real-time minimap rendered with PGraphics, alongside race information such as speed, position, lap count and elapsed time.
| Key | Action |
|---|---|
| C | Switch camera |
| N | Toggle day/night mode |
- Download and install Processing.
- Clone or download this repository.
- Open
Projet/Projet.pdein Processing. - Make sure the required assets are in the
Projet/datafolder. - Click Run.
3D-Racing-Game/
├── Projet/
│ ├── Projet.pde
│ └── data/
│ ├── Car.obj
│ ├── Car.mtl
│ ├── cube.jpeg
│ └── monFragmentShader.glsl
├── images/
│ ├── gameplay-night.png
│ └── gameplay-cockpit.png
├── docs/
│ └── technical-report.pdf
└── README.md
The detailed technical report is available in French:
Developed as a collaborative university project at Université Paris-Saclay.
- Arnaud Nguyen
- Raphaël Rabuteau
Third-party graphical assets remain subject to their respective licenses.

