Highway Racer

Seele01-Flash
By
Highway Racer is an adrenaline-pumping 3D racing game where you speed down busy highways while dodging traffic. Choose from multiple cars and game modes, earn gold through risky maneuvers, and compete with players worldwide.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Highway Racer". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: 3D Arcade Racing with a "Wet/Neon" aesthetic similar to the screenshot. Use low-poly geometry but enhance it with `MeshStandardMaterial` to simulate wet asphalt reflections and street lights. * **Player Vehicle**: A sleek, arcade-style sports car (resembling a yellow muscle car) positioned in a third-person rear chase view. Add trail renderers or simple elongated geometries behind taillights to simulate speed/motion blur without expensive post-processing. * **Environment**: An infinite 4-lane highway system. Use a scrolling texture technique for the road to simulate high speed. The environment should include guardrails and simple low-poly grass banks on the sides. Implement `Three.FogExp2` (dark blue/grey) to hide the render distance and create a moody atmosphere. * **Weather Effects**: Implement a lightweight particle system for rain (falling streaks). The road material should have high roughness contrast to look "wet." * **Traffic**: Low-poly boxy cars (sedans, trucks) appearing in different colors. **Performance Note**: Use `InstancedMesh` for traffic cars to minimize draw calls on mobile devices. * **Camera**: A smooth `PerspectiveCamera` that lags slightly behind the player's car (Lerp) to create a sense of weight and acceleration. ### 2. Audio Requirements * **BGM**: A looping, high-energy electronic/synth-wave track that builds tension as speed increases. * **Sound Effects (SFX)**: * **Engine**: Continuous engine drone, pitch-shifting up based on speed variable. * **Environment**: Constant white noise of rain and wind. * **Traffic**: "Doppler effect" swoosh sounds when passing other cars. * **Near Miss**: A sharp "Whoosh" or "Ding" sound when passing close to a car without hitting it. * **Crash**: Glass breaking and metal crunching sound on game over. ### 3. Gameplay Loop * **Core Mechanic**: The car auto-accelerates to a maximum speed. The player steers left/right to switch lanes and avoid traffic. * **Game Modes (Logic)**: * **One-Way**: All traffic moves away from the player (easiest). * **Bomb Mode**: (Priority Feature) The player's car has a health bar/timer. If speed drops below 80km/h (due to braking or friction), the bomb timer counts down. If it reaches zero, Game Over. * **Scoring System**: * Score increases based on distance traveled. * **"Near Miss" Bonus**: Detect when the player's bounding box is within a small margin of a traffic car's bounding box (without intersecting). Award +100 points and flash text on screen. * **Progression**: Coins appear randomly on the road. Collecting coins updates a persistent `localStorage` balance. ### 4. Mobile Controls & Interaction * **Orientation**: **Landscape Mode** (Force landscape via CSS prompt if necessary). * **Steering**: * Divide the screen width into two invisible touch zones: Left 40% (Steer Left), Right 40% (Steer Right). * Steering should have slight inertia (not instant snapping) for a realistic car feel. * **Braking**: * A dedicated translucent button icon in the bottom-right corner (at least 64x64px for hit testing). Holding it decelerates the car. * **UI Layout**: * Top Center: Distance/Score (Large, bold font). * Top Right: Speedometer (km/h). * Center Screen: "Game Over" modal with a "Restart" button (large tap target). * **Haptic Feedback**: Trigger `navigator.vibrate(50)` on a "Near Miss" and `navigator.vibrate(200)` on a Crash (if supported). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Highway Racer

Highway Racer is an exhilarating 3D racing game that puts you behind the wheel on dangerous highways filled with traffic. This free browser-based racing experience challenges you to build up incredible speeds while skillfully avoiding collisions with other vehicles. The game rewards risk-taking behavior like near misses and wrong-side driving with bonus points and gold.

Core Features

Highway Racer delivers an authentic high-speed racing experience with impressive features:

  • Completely Free : Play instantly in your browser without any downloads or payments required
  • Stunning 3D Graphics : Experience realistic highway environments with smooth animations and detailed car models
  • Multiple Vehicle Options : Choose from a diverse fleet including trucks, classic sedans, and modern sports cars
  • Four Exciting Game Modes : One-way, two-way, time attack, and the explosive bomb mode
  • Online Multiplayer : Compete against real players from around the world in intense racing battles
  • Vehicle Customization : Upgrade performance and customize aesthetics using earned gold
  • Cross-Platform Support : Perfect compatibility with desktop and mobile browsers

Diverse Game Modes

Each game mode offers a unique racing challenge. In the thrilling bomb mode , you'll drive a truck loaded with explosives that could detonate at any moment, adding extreme tension to every turn and acceleration.

Risk-Reward System

The game encourages bold driving through its innovative scoring system. Execute perfect near misses, drive against traffic, and push your speed to the limit to maximize your gold earnings. Every run becomes a calculated risk between safety and reward.

Gameplay Mechanics

Highway Racer combines simple controls with deep strategic elements:

  • Dynamic Traffic System : Navigate through realistic traffic patterns that change with each playthrough
  • Gold Economy : Earn currency based on distance traveled, bonus actions, and risk-taking maneuvers
  • Progressive Unlocks : Use accumulated gold to purchase new vehicles and upgrade existing ones
  • Performance Tuning : Fine-tune acceleration, top speed, handling, and braking to match your driving style

Operation Guide

The game features intuitive controls designed for both keyboard and touch interfaces:

  • W Key or Up Arrow : Accelerate your vehicle forward
  • A/D Keys or Left/Right Arrows : Steer your car left and right
  • Spacebar : Engage handbrake for emergency stops or sharp turns
  • Mouse : Navigate menus and customize vehicles

Start by selecting your preferred car and game mode. Focus on maintaining high speeds while avoiding crashes. The key to success is learning traffic patterns and timing your overtaking maneuvers perfectly.

Why Play Highway Racer

This game stands out in the crowded racing genre through its perfect balance of accessibility and depth. Whether you're looking for a quick adrenaline rush or extended gaming sessions, Highway Racer delivers. The multiplayer component adds competitive excitement, while the vehicle upgrade system provides long-term progression goals. Best of all, it's completely free and runs smoothly on any modern device with a web browser.

Frequently Asked Questions (FAQ)