PolyTrack - Build & Race Custom Car Tracks

Seele01-Flash
By
PolyTrack is a unique 3D racing game where you build custom tracks and race against the clock. Featuring a powerful track editor, ghost racing, and vibrant community-created content.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "PolyTrack". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Low-poly, flat-shaded aesthetic similar to "TrackMania" or minimal vector art. Use vibrant, high-contrast colors (e.g., bright blue car, beige track, deep red obstacles) with sharp shadows to define geometry. * **Car Model:** An abstract, open-wheel Formula 1 style racer. It should be constructed from simple geometric primitives (boxes, cylinders) to keep the polygon count low. Allow for dynamic color changes (Body, Rims, Spoiler). * **Track Design:** The track must be modular, consisting of segments: Straight, 90-degree Curve, Ramp, and Loop-de-loop. The track surface should have distinct borders (red/white curbs). * **Environment:** A minimal infinite horizon with a vertical gradient sky (blue to white). Use simple low-poly mountains or geometric shapes in the distance as scenery. * **Performance:** Use `InstancedMesh` for repeated track segments if possible. Limit real-time lights to one directional light (sun) and use baked ambient occlusion or vertex colors for depth. ### 2. Audio Requirements * **BGM:** Upbeat, high-tempo Electronic/Synthwave track that loops seamlessly to maintain adrenaline. * **SFX:** * **Engine:** Synthesized engine drone that increases in pitch based on the car's velocity. * **Tires:** High-pitched screeching sound triggering specifically when the car is drifting or cornering hard. * **Feedback:** A satisfying "Click" or "Thud" when landing a jump. A digital "Chime" when passing checkpoints. ### 3. Gameplay Loop * **Core Mechanic:** Time Attack. The player races against a timer on a complex 3D track. * **Physics:** Arcade-style physics. The car should have high grip but be capable of drifting. Gravity must be strong enough to handle loops, but the car needs "downforce" logic to stick to the track when upside down in a loop. * **Ghost System:** Record the player's position/rotation every frame. On the next run, replay this data as a semi-transparent "Ghost Car" to compete against. * **Fail State:** Falling off the track. Instant respawn at the last passed checkpoint (or start line) with a penalty time or reset timer. ### 4. Mobile Controls & Interaction * **Touch Controls (Landscape):** * **Left Side:** Two large, invisible touch zones or visible arrow buttons for **Steering (Left/Right)**. * **Right Side:** Two large buttons for **Gas** (lower right) and **Brake/Reverse** (lower left of the right cluster). * **Quick Actions:** A distinct "Restart" button in the top-right corner for instant track reset (crucial for this genre). * **Camera:** Third-person chase camera. It should have a slight "lag" (Lerp) to convey speed and must dynamically adjust FOV (Field of View) wider as speed increases. * **Feedback:** * **Visual:** Speed lines or motion blur at high speeds. Smoke particles from tires when drifting. * **Haptic:** Trigger device vibration (Navigator.vibrate) upon collision or landing a jump. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About PolyTrack

PolyTrack is a revolutionary 3D car racing game that puts you in control of both the track design and the racing experience. Unlike traditional racing games, PolyTrack challenges you to build your own custom race tracks using intuitive design tools, then test your skills by racing on them at breakneck speeds.

Inspired by the legendary TrackMania series, this low-poly racing game combines creative track building with intense time-trial racing. With over 47 tracks available (15 official and 32 community-created), PolyTrack offers endless racing possibilities across summer, winter, and desert environments.

Core Features

Powerful Track Builder

PolyTrack's built-in level editor is the game's crown jewel. Create custom tracks with: - Loops, jumps, and high-speed sections for maximum thrills - Various obstacles and ramps to challenge racers - Precision building tools for crafting the perfect racing line - Export and share functionality to showcase your creations

Ghost Racing System

One of PolyTrack's most innovative features is its asynchronous racing system. Challenge opponents by selecting them from leaderboards and race against their "ghost" cars. You can even race against your own best times to continuously improve your performance.

Vehicle Customization

Personalize your racing experience by customizing your car's appearance: - Choose primary and secondary colors - Customize car frame colors - Select unique rim designs - Create a vehicle that reflects your style

Community Integration

Join a thriving community of track builders and racers: - Access design codes shared by other players - Get customization tips from experienced builders - Challenge community records on leaderboards - Discover new track designs daily

Game Modes

Time Trial Racing

Race against the clock on various tracks, constantly striving to improve your lap times. Every millisecond counts as you navigate through challenging courses designed for speed and precision.

Track Building Mode

Unleash your creativity in the comprehensive track editor. Start with simple straight-line tracks and gradually master complex designs featuring mountain jumps and gravity-defying loops.

Community Challenges

Compete against verified player records and test your skills on both official and community-created tracks spanning three distinct environments.

Available Tracks

Official Tracks (15 total): - 7 summer environment tracks - 4 winter landscape tracks
- 4 desert terrain tracks

Community Tracks (32 total): - 13 summer tracks - 7 winter tracks - 12 desert tracks

Each environment offers unique visual experiences while maintaining consistent, thrilling gameplay mechanics.

Controls & Gameplay

Racing Controls

  • WASD or Arrow Keys : Drive your vehicle
  • Enter or R : Restart current race

Track Editor Controls

  • Left-click : Build track elements
  • Right-click + drag : Move camera view
  • Mouse scroll : Zoom in/out
  • Shift + scroll : Adjust height
  • R/Space : Rotate items
  • T : Test drive your creation

Why Play PolyTrack

PolyTrack offers a unique gaming experience that combines creativity with competitive racing. Whether you're a track-building enthusiast or a speed demon chasing perfect lap times, this game delivers:

  • Complete creative freedom in track design
  • Endless replayability with community content
  • Skill-based progression through time trials
  • Social competition via leaderboards and ghost racing
  • Cross-platform compatibility on all modern browsers

Best of all, PolyTrack is completely free to play with no downloads required. Simply open your browser and start building your racing empire today!

Frequently Asked Questions (FAQ)