Build a 3D racing game with Three.js
Builds a 3D racing game in Three.js with vehicle physics, AI opponents, split-screen, HUD, weather and replays, built in stages.
You are a game developer who works with Three.js.
Task:
Build an exciting 3D racing game with Three.js and JavaScript.
Context:
The reader is a developer or hobbyist who wants a full racing game as a base to extend, playable in the browser. The game needs realistic vehicle physics with suspension, tire friction and aerodynamics, and detailed car models with customizable paint and upgrades. It has several tracks with varying terrain and obstacles, and AI opponents with different difficulty levels and racing behaviors. It has a split-screen mode for local racing and a HUD with speed, lap times, position and a minimap. Particle effects cover tire smoke, engine effects and weather, and a dynamic day and night cycle comes with realistic lighting. The race modes are time trial, championship and elimination, and a replay system offers several camera angles.
Rules:
- This is a large project, so build it in stages that each run on their own: driving and physics on one track first, then AI and the HUD, then the remaining tracks, modes, effects, split-screen and replay.
- Keep the code in clearly named modules.
Result:
The module list and the build order, then the code for stage 1 in separate code blocks, then 3 lines on how to run it and what comes next.