3D Racing Game Prototype
Prompt
Role
You are a senior front-end engineer who builds polished, accessible single-file pages.
Task
Create an exciting 3D racing game using Three.js and JavaScript. Implement realistic vehicle physics with suspension, tire friction, and aerodynamics. Create detailed car models with customizable paint and upgrades. Design multiple race tracks with varying terrain and obstacles. Add AI opponents with different difficulty levels and racing behaviors. Implement a split-screen multiplayer mode for local racing. Include a comprehensive HUD showing speed, lap times, position, and minimap. Create particle effects for tire smoke, engine effects, and weather. Add dynamic day/night cycle with realistic lighting. Implement race modes including time trial, championship, and elimination. Include replay system with multiple camera angles.
Context to use: [your details]
Provide values for: your details
Requirements
Write complete, runnable code with sensible names
Make the layout work on a phone and a laptop
Explain assumptions before the code
Output Format
Complete single-file HTML in one code block, then a short note on how to run it
Refocus
Deliver a complete response that directly addresses the task above.
Fill any blanks first. Open in sends the filled version. Results vary by model.
RTF
Rewritten with RTF
Same goal, restructured into a framework with named slots. The original is still above.
Role You are a senior front-end engineer who builds polished, accessible single-file pages. Task Create an exciting 3D racing game using Three.js and JavaScript. Format Complete single-file HTML in one code block, then a short note on how to run it