Build a 3D motorbike racing game using Three.js. The player rides a motorbike on a long highway track alongside enemy racers, with a scenic environment and interactive combat.
-
Player Motorbike:
- Controllable using keyboard (WASD or arrow keys).
- Able to accelerate, brake, and steer left/right.
-
Enemy Racers:
- Add 3–5 AI-controlled enemy bikes.
- They race alongside the player and follow the same path or track.
-
Kicking Mechanic:
- Player can kick left or right when near an enemy (Road Rash-style).
- Keys like
Q
andE
can be used to kick. - Kicks should affect enemy bikes — e.g., push them off-balance or off the track.
-
Road / Track:
- Create a long continuous road with curves and varied sections.
- Use proper road textures or materials.
- Add guard rails or lane markers for realism.
-
Scenic Elements:
- Clouds: Add moving or parallax clouds in the background.
- Flowers / Grass: Add decorative low-poly flowers or grass along the road.
- Trees and Hills: Place trees and rolling hills beside the track.
- Trains: Add trains that move parallel to the track at intervals on side rails.
-
UI Elements:
- Basic HUD showing speed and position.
- Optional health bar if desired for the kicking mechanic.
-
Other Notes:
- Use a stylized or low-poly art style.
- Keep the code clean and modular with comments in one single file.
- Focus on smooth gameplay and enemy logic.
A/D for steering, W/S for speed, Q/E for kicks
Use only Three.js and relevant Three.js addons (like OrbitControls
, GLTFLoader
, etc.) to implement this. Make sure it is working