Skip to content

Instantly share code, notes, and snippets.

@patrickloeber
Last active May 22, 2026 13:41
Show Gist options
  • Select an option

  • Save patrickloeber/51c9226f87756475e207b3a3e5a767d4 to your computer and use it in GitHub Desktop.

Select an option

Save patrickloeber/51c9226f87756475e207b3a3e5a767d4 to your computer and use it in GitHub Desktop.
racing-game with gemini

Racing game

Built with:

  • Gemini 3.5 Flash (Medium)
  • Antigravity 2.0

starter prompt:

Create a single-file HTML/Three.js arcade racing game matching this visual style and UI layout:

1. **Aesthetics & Environment:**
   - **Colors:** A warm orange/sunset sky, brown terrain, and simple blocky skyscraper silhouettes in the background.
   - **Track:** A dark asphalt road.
   - **Cars:** Cute, tiny, low-poly voxel cars in different colors.
   - **Camera:** Low-angle 3rd-person chase camera with a wide field of view to emphasize speed.

2. **UI & Screen Effects (HTML/CSS Overlay):**
   - **Right-Panel:** Top-right stats showing Position (e.g., "6th"), Lap (e.g., "Lap 1/3"), Time, and Speed.
   - **Minimap:** Top-left circular minimap showing track outline and dots for racer positions.
   - **Item Box:** Bottom-right card labeled "Item" (e.g., "Boost").
   - **Vignette:** Transparent CSS overlay with fast-moving speed lines radiating from the screen edges toward the center.

3. **Core Gameplay:**
   - WASD/Arrow controls with simple arcade physics (accelerate, brake, slide/drift).
   - A looped track featuring 5 active AI opponents.
   - Self-contained code in a single file using standard CDN imports for Three.js. No external assets or heavy physics libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment