Racing in City

Seele01-Flash
By
Racing in City is an immersive driving simulator that puts you behind the wheel in realistic city traffic. Navigate through challenging traffic scenarios, complete career missions, and customize your dream car in this free-to-play racing experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Racing in City". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Camera & Perspective**: The game must use a **First-Person Cockpit View**. The camera is fixed inside the car, showing the dashboard, a working speedometer, and hands on the steering wheel. The steering wheel must rotate visually based on input. * **Car Models**: * **Player Car**: High-detail interior (dashboard, windshield), low-poly exterior (since it's mostly unseen). Includes a rearview mirror with a simple simulated reflection (render target or static map). * **Traffic Cars**: Low-poly variants (Sedans, SUVs, Trucks) using object pooling to optimize performance. They should have simple colors and brake lights. * **Environment Generation**: An infinite, procedurally generated highway. * **Visual Style**: Semi-realistic city highway. * **Zones**: Transitions between "Open Highway" (Skybox, distant buildings) and "Tunnel" (Concrete textures, overhead ceiling lights). * **Mobile Optimization**: Use `InstancedMesh` for repeated environment props (street lamps, barriers). Limit real-time shadows; use baked lighting on road textures where possible. ### 2. Audio Requirements * **BGM**: High-energy, looping electronic/rock track to induce adrenaline. * **SFX**: * **Engine**: Continuous engine loop where pitch increases with the car's speed. * **Environment**: Doppler effect "Whoosh" sound when passing traffic cars closely. * **Feedback**: "Ka-ching" sound for earning points (near misses). Metal crunch/glass break for collisions. * **UI**: Mechanical clicks for menu interaction. ### 3. Gameplay Loop * **Core Mechanics**: * **Endless Driving**: The player drives forward automatically (or holds gas). The goal is to survive as long as possible without crashing. * **Traffic System**: AI cars spawn ahead in different lanes (3-4 lanes total). Some move slower, some change lanes unpredictably. * **Scoring**: Score increases by distance traveled. * **Risk/Reward System**: "Near Miss" mechanic – passing a car very closely at high speed grants bonus points and a visual "Combo" text pop-up. * **Game Modes (Implement "One Way" first)**: All traffic moves in the same direction. * **Fail State**: Any collision with a traffic car ends the run immediately. Show a "Game Over" screen with the final score and "Restart" button. ### 4. Mobile Controls & Interaction * **Control Scheme (Touch)**: * **Steering**: Two invisible touch zones on the left and right sides of the screen. Tap/Hold Left to steer left; Tap/Hold Right to steer right. (Alternative: Use DeviceOrientationEvent for tilt controls if supported). * **Pedals**: Visual UI overlay buttons on the bottom right (Gas) and bottom left (Brake). * **UI/HUD**: * **Dashboard**: The in-car speedometer needle must move based on `currentSpeed`. * **Overlay**: Score display at the top center. Pause button at the top right (hitbox min 44px). * **Feedback**: * **Haptic**: Trigger `navigator.vibrate(200)` upon collision. Light vibration when performing a "Near Miss". * **Visual**: Camera shake effect (screen rumble) when driving at max speed or crashing. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Racing in City

Racing in City is a thrilling driving simulation game that combines realistic traffic navigation with exciting racing challenges. Experience the rush of driving through busy city streets from a first-person cockpit view, where every decision matters and split-second timing can make the difference between success and failure.

This comprehensive racing experience offers multiple game modes, extensive car customization options, and a rewarding career progression system that keeps players engaged for hours. Whether you're a casual driver looking for some quick fun or a racing enthusiast seeking deep gameplay mechanics, Racing in City delivers an authentic urban driving experience.

Core Features

Realistic First-Person Driving Experience

The game's standout feature is its immersive cockpit view that puts you directly behind the steering wheel. Watch the road through your windshield, check your mirrors for approaching traffic, and feel the authentic driving experience as you navigate through realistic city environments.

Multiple Game Modes for Every Player

  • Career Mode : Progress through challenging missions and unlock new content
  • One Way Traffic : Practice your skills with oncoming traffic from one direction
  • Two Way Traffic : Face the ultimate challenge with cars coming from both directions
  • Time Attack : Race against the clock to set new personal records
  • Free Ride : Explore the city at your own pace without objectives

Extensive Car Customization System

Choose from 13 different vehicles and customize them to your heart's content. Upgrade engine performance, add visual modifications like spoilers and brake calipers, and create your perfect racing machine. Each car offers unique handling characteristics and upgrade potential.

Dynamic Traffic System

The game features intelligent AI traffic that creates realistic driving scenarios. Navigate through dense city traffic, make calculated risks for bonus points, and master the art of safe yet aggressive driving.

Gameplay Mechanics

Traffic Dodging Strategy

Success in Racing in City requires more than just speed. Learn to read traffic patterns, anticipate lane changes, and take calculated risks to maximize your score. Driving close to other vehicles and overtaking at high speeds earns bonus points, but one wrong move could end your run.

Progressive Career System

The career mode takes you through increasingly challenging scenarios across different city locations. Each mission has unique objectives that test different aspects of your driving skills, from precision parking to high-speed pursuits.

Money and Upgrade System

Earn in-game currency by completing missions, dodging traffic successfully, and taking calculated risks. Use your earnings to purchase new vehicles, upgrade existing cars, or unlock new driving locations for variety.

Controls and Accessibility

The game features intuitive controls that work seamlessly across all platforms: - WASD or Arrow Keys : Steer, accelerate, and brake your vehicle - Mouse : Navigate menus and adjust camera angles - Cross-Platform Compatibility : Play on desktop browsers, mobile devices, iOS, and Android

Why Play Racing in City

Racing in City stands out in the crowded racing game market by focusing on realistic traffic simulation rather than just pure speed. The game rewards strategic thinking, patience, and precise driving skills. It's perfect for players who enjoy:

  • Realistic driving physics and authentic car behavior
  • Strategic gameplay that rewards calculated risks
  • Long-term progression with meaningful upgrades
  • Stress-free gaming sessions with the Free Ride mode
  • Cross-platform accessibility for gaming anywhere

The game's free-to-play model means you can jump in immediately without any financial commitment, making it an excellent choice for both casual players and dedicated racing fans.

Frequently Asked Questions (FAQ)