Skip to content
 
 

Repository files navigation

Drone World — Flight Simulator

A browser-based 3D drone flight simulator built with Three.js. Fly a quadcopter through a procedural city, collect coins, run delivery missions, and race against the clock.

Features

  • Physics-based drone flight — altitude, speed, vertical speed, heading, battery, and health
  • Procedural 3D city — terrain, buildings, roads, and landmarks with shadows and fog
  • Day/night cycle with adjustable time of day
  • Weather system — clear, cloudy, rain, and storm
  • Wind simulation that affects your drone
  • Racing mode — fly through checkpoints around the city and beat the clock
  • Delivery missions — pick up packages and deliver them to marked sites
  • Coin collection with streak bonuses; coins respawn
  • Repair center at the map center for recharging battery and health
  • Multiple camera modes (chase cam, etc.) with an artificial horizon and minimap
  • Full HUD — telemetry, score, coins, mission banner, FPS counter
  • Desktop (keyboard) and mobile (touch) controls with dual virtual sticks and a boost button

Controls

Desktop

Key Action
W / S Forward / back
Q / E Strafe left / right
A / D Yaw
/ Climb / descend
Shift Boost
C Camera mode
P Pause
R Start race (at the repair center)
M Start delivery mission
H Respawn

Touch / Mobile

  • Left stick — move / strafe
  • Right stick — yaw / altitude
  • BOOST — hold to speed up
  • Camera button — cycle camera modes
  • RACE — start a race (at the repair center)

Getting Started

npm install
npm run build

Then serve the folder with any static file server:

npx serve .

Open http://localhost:3000 (or the printed URL) in a browser.

The build step uses esbuild to bundle lib/simulator.js and Three.js into lib/simulator.bundle.js, which index.html loads.

Tech Stack

  • Three.js — 3D rendering
  • esbuild — bundling
  • Vanilla JavaScript — no framework

Project Structure

.
├── index.html          # Entry point — HUD, panels, and UI markup
├── lib/
│   ├── simulator.js    # Game source (bundled)
│   └── simulator.bundle.js  # Generated build output (do not edit)
├── fonts/              # Font styles
├── package.json        # Dependencies and build script
└── .github/workflows/  # CI — builds and deploys to GitHub Pages

License

MIT

About

3D drone flight simulator built with Three.js — fly through a procedural city, race checkpoints, run delivery missions, and battle the weather.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages