How nuclearplane787/flight-sim works
Flight Sim is a browser-based airliner simulator focused on flights between South Korean airports. The principal workflow is to configure or load a scenario, fly an aircraft through the simulation, manage gate departure and taxi when starting parked, then receive a landing score and logbook entry. The architecture spans flight physics and aircraft-specific systems, cockpit and flight controls, world rendering and weather, and persistent scenarios and scoring. README descriptions preserve major capabilities; several subsystem links below are dashed because the sampled source does not show their runtime wiring.
Main entry points: main.js Game runtime · types.js Aircraft systems · sim.js Flight simulation · gate-flow.js Gate and taxi flow
Components 27
Flight simulation
- Flight simulation
src/sim/sim.js - Aircraft systems
src/sim/types.js - Aircraft performance data
src/sim/a321neo.js - Engine registry
src/sim/engine-types.js - Aircraft designs
src/sim/designs.js - Path prediction
src/sim/predict.js
Aircraft and cockpit
- A321 model
src/aircraft.js - Widebody models
src/widebody.js - Engine geometry
src/engine-model.js - Cockpit instruments
src/cockpit.js - Boeing instruments
src/ui/boeing/pfd.js - Flight controls
src/input.js
World and ground operations
- World rendering
src/world/world.js - Sky and weather
src/world/sky.js - Airports and runways
src/world/airports.js - Parked traffic
src/world/traffic-layout.js - Gate and taxi flow
src/ground/gate-flow.js - Taxi routing
src/ground/taxi.js
Game experience
- Game runtime
src/main.js - Flight setup
src/ui/setup.js - Path map
src/ui/map.js - Weather controls
src/ui/weather-window.js - Sound and callouts
src/audio/synth.js
Scenarios and results
- Scenario saves
src/scenarios.js - Landing score
src/score.js - Flight logbook
src/ui/logbook.js
Other components
- Pilot
Connections 30
- Pilot → Game runtime: starts and controls
- Game runtime → Scenario saves: loads and saves
src/main.js - Game runtime → Gate and taxi flow: manages gate flow
src/main.js - Game runtime → Flight simulation: advances flight
src/main.js - Game runtime → World rendering: renders flight
src/main.js - Game runtime → Landing score: records landings
src/main.js - Game runtime → Flight logbook: opens logbook
src/main.js - Game runtime → Weather controls: opens weather
src/main.js - Game runtime → Sound and callouts: plays callouts
src/main.js - Pilot → Flight setup: configures flight
- Flight setup → Game runtime: starts scenario
src/main.js - Flight simulation → Aircraft systems: uses type systems
- Aircraft systems → Aircraft performance data: selects performance data
src/sim/types.js - Aircraft systems → Engine registry: selects engine types
- Aircraft designs → Aircraft systems: provides aircraft designs
src/sim/designs.js - A321 model → Engine geometry: builds engines
src/aircraft.js - Widebody models → Engine geometry: builds engines
src/widebody.js - Pilot → Flight controls: sends inputs
- Game runtime → Flight controls: reads controls
src/main.js - Flight simulation → Path prediction: requests predicted path
- Pilot → Path map: views and changes route
- Game runtime → Path map: shows path map
src/main.js - Game runtime → Sky and weather: applies weather
- Pilot → Weather controls: sets conditions
- Gate and taxi flow → Taxi routing: plans taxi route
src/ground/gate-flow.js - Taxi routing → Parked traffic: checks stand obstacles
src/ground/taxi.js - Gate and taxi flow → Airports and runways: uses airport data
- Game runtime → Scenario saves: restores flight state
src/main.js - Landing score → Flight logbook: adds flight record
- Aircraft systems → Boeing instruments: supplies engine data