← Prompts

Flight Simulator

Read the current prompt
This prompt is designed to be given to an AI model or a development team to establish a clear, high-fidelity goal for building the simulator. It emphasizes technical constraints and the critical importance of realistic physics.

***

# 🚀 Three.js Flight Simulator Prompt: Apex Aero

## 🎯 Project Goal
Design and develop a high-fidelity, physically accurate 3D flight simulator implemented entirely in HTML using **Three.js** (or a compatible framework like Babylon.js) and pure JavaScript/TypeScript. The core experience must prioritize realistic aerodynamics, inertial forces, and challenging gameplay across diverse scenarios.

## 🛠️ Technical Stack & Core Requirements
1.  **Engine:** Three.js (mandatory for all rendering and scene management).
2.  **Language:** JavaScript/TypeScript.
3.  **Physics Engine:** Implement a custom, highly detailed Newtonian physics model that simulates flight dynamics realistically (not just simple linear movement).
4.  **Input:** Mouse/Keyboard controls for pitch, roll, yaw, throttle, and thrust management.

## ✨ Feature Breakdown

### 1. Aircraft Selection & Differentiation (The Fleet)
Implement a minimum of **three distinct aircraft models**. These planes must possess mathematically differentiated attributes that directly affect flight physics:

*   **Attribute Examples:** Max Speed, Thrust/Engine Power, Lift Coefficient, Drag Profile, Turning Radius, Weight, and Maneuverability Response.
*   **Visuals:** Each plane must have a unique, high-quality 3D model.

### 2. Terrain Generation (The World)
*   **Procedural Generation:** The environment must be procedurally generated to create vast, varied, and visually stunning landscapes (mountains, valleys, coastlines).
*   **Detail:** Implement complex geometry with accurate heightmaps and texture mapping to ensure realistic visual scale and topographical awareness for the pilot.
*   **Collision Detection:** Terrain interaction must accurately reflect ground friction and altitude constraints.

### 3. Gameplay Scenarios (The Missions)
The game must include two primary, distinct gameplay modes:

#### A. Takeoff/Landing Scenario (Precision Flight)
*   Focus on managing altitude, airspeed, and engine power precisely.
*   Requires accurate simulation of lift-off physics, climb rates, descent control, stall limits, and runway requirements based on the chosen aircraft's weight and performance characteristics.

#### B. Dogfight Scenario (High-Speed Maneuvering)
*   Focus on high-G maneuvering, managing speed, angle of attack, and inertia in a dynamic combat environment.
*   Requires accurate simulation of slipstream effects, banking dynamics, and the physical limits of the aircraft during aggressive turns and evasive maneuvers.

## 🔬 Physics & Fidelity (The Critical Focus)
**This is the single most important requirement.** The game must feel *physically accurate* and challenging.

1.  **Aerodynamics:** Implement realistic drag calculation (profile drag vs. induced drag), lift generation based on angle of attack, and realistic air density effects based on altitude.
2.  **Inertia & Momentum:** Aircraft movement must account for inertia. Sudden changes in direction or thrust must result in realistic lag, pitch/roll response time, and momentum carry-over.
3.  **Engine Response:** Throttle input must accurately translate to force, RPM changes, engine heat/stress (optional visual feedback), and realistic acceleration rates based on the plane's power-to-weight ratio.
4.  **Atmospheric Effects:** Altitude must affect air density and performance; this effect must be consistent across all scenarios.

## 🎧 Audio Immersion
Sound design is mandatory for full immersion. The audio experience must be dynamic and directly linked to the physics calculations.

*   **Engine Sound:** Engine noise, pitch, and volume must change realistically based on throttle input, RPM, acceleration, and altitude (accounting for air density).
*   **Aerodynamic Sounds:** Implement realistic sound effects for airflow over the wings and control surfaces (e.g., whistling or roaring based on speed/angle of attack).
*   **Environmental Audio:** Include dynamic ambient sounds that reflect the environment (e.g., wind noise increasing at higher altitudes, distant rumble of mountains).

## 🎨 Aesthetic & User Experience
*   **Visual Style:** Cinematic, high-definition realism. Use modern lighting techniques (PBR materials) to enhance the visual beauty of the procedural terrain.
*   **UI/HUD:** The Heads-Up Display (HUD) must clearly display critical flight data (Altitude, Airspeed, Pitch, Roll, Engine Status) in a clean, intuitive format.

## ✅ Deliverables Summary
The result should be an interactive application demonstrating:
1.  A fully functional Three.js scene with procedurally generated terrain.
2.  Three selectable aircraft with distinct physics profiles.
3.  Functional controls for realistic flight dynamics.
4.  Working Takeoff/Landing and Dogfight scenarios, demonstrating the accurate interaction of the defined physics models.