Skip to content

Instantly share code, notes, and snippets.

@shricodev
Created June 15, 2025 10:04
Show Gist options
  • Save shricodev/62032036259685afc88858347728ae04 to your computer and use it in GitHub Desktop.
Save shricodev/62032036259685afc88858347728ae04 to your computer and use it in GitHub Desktop.
Bike Racing Prompt - Blog Demo

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.

Requirements:

  • 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 and E 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment