Skip to content

About

3D racing game built with Java, Processing and GLSL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

3D Racing Game

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.

Screenshots

Night mode

Night gameplay

Cockpit view

Cockpit gameplay

Features

  • 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)

Technologies

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

Technical Overview

Track Generation

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 Movement

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.

Camera System

The camera follows the player's position and orientation along the track. Players can switch between different camera perspectives during the race.

Graphics and Shaders

The environment uses textured skyboxes, procedural asphalt textures, dynamic lighting and a GLSL fragment shader to simulate atmospheric fog.

User Interface

The game includes a real-time minimap rendered with PGraphics, alongside race information such as speed, position, lap count and elapsed time.

Controls

Key Action
C Switch camera
N Toggle day/night mode

Installation

  1. Download and install Processing.
  2. Clone or download this repository.
  3. Open Projet/Projet.pde in Processing.
  4. Make sure the required assets are in the Projet/data folder.
  5. Click Run.

Project Structure

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

Documentation

The detailed technical report is available in French:

Technical Report

Authors

Developed as a collaborative university project at Université Paris-Saclay.

  • Arnaud Nguyen
  • Raphaël Rabuteau

Asset Credits

Third-party graphical assets remain subject to their respective licenses.

About

3D racing game built with Java, Processing and GLSL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages