Lights On — Drone Sim

Physics-first drone simulation, built in Godot 4.6

A full-stack simulation environment modelling a quadcopter with real battery drain, wind turbulence, swarm AI, and an autopilot mode. Open source and free to run.

Windows Linux macOS Web Godot 4.6 39-drone swarm OpenXR VR

What it is

Drone Sim is a Godot 4.6 project built around a realistic quadcopter flight model. Physics, swarm AI, terrain, and VR all run inside the same Godot scene. Open the project, hit play, and you're in the air.

Godot project

Godot-drone-master

Flight physics, swarm AI, terrain, VR, day/night cycle. Runs at 1080p/60fps with Forward Plus rendering.

Deployment

Docker support

Includes a Dockerfile for running the sim headless. Useful for server deployments or automated testing.

Open source

MIT licence

All source code is available. Fork it, modify the physics constants, add new modes — it's yours to do with as you like.


Screenshots

Real-time flight physics and shape formations. More screenshots can be dropped into the images/ folder anytime.


Features

Built around a DJI Mini 4K-inspired quadcopter. The constants for wind, battery, and physics are all exposed at the top of Drone.gd if you want to tune them.

Flight physics

Throttle, pitch, roll, yaw — all with input smoothing, hover hold, tilt limits, and ground clearance detection.

Wind and turbulence

Three turbulence layers run simultaneously: fast jitter, medium sway, and slow drift. Gusts affect drone attitude in real time.

Battery drain

Around 20 minutes of flight life. Aggressive manoeuvres burn more. At critical charge the drone returns home and lands automatically.

Swarm AI

39 boids-driven drones with cohesion, separation, and alignment. Five preset formations — Star, Circle, Heart, Diamond, Wave — plus edge detection mode: give the sim a PNG or 3D model and it runs edge detection on it, then positions the swarm along the detected edges to trace the shape in the sky.

Autopilot

Configurable waypoint lists with smooth navigation. Load a route and watch the drone fly it while you switch camera angles.

VR / OpenXR

First-person flight on any OpenXR-compatible headset. VRManager detects your runtime at launch — SteamVR, Monado, whatever you have.

Procedural world

Terrain3D plugin, town generator, HDR sky, day/night cycle, and a minimap. The environment changes as you fly through it.


Pick a mode and fly

The main menu gives you four options. Each one is independent — you're not locked into a single setup.

Manual

Single Drone

Full keyboard control with physics running. Good starting point for understanding the flight model.

Swarm

Swarm Mode

39 drones running boids behaviour. Tab through formations and watch them reorganise mid-flight.

Autonomous

Autopilot

Pre-set waypoint route. The drone handles navigation — you just watch or switch camera angles.

Immersive

VR

First-person view through any OpenXR headset. Needs a runtime (SteamVR or Monado) running first.


Controls

All keys are active in Single Drone mode. In Swarm mode, Tab is the main extra key you'll use.

Key Action Details
SpaceThrottle upIncrease altitude and motor output
ShiftThrottle downReduce altitude and motor output
WPitch forwardMove the drone forward
SPitch backMove the drone backward
AStrafe leftLateral roll movement
DStrafe rightLateral roll movement
QYaw leftRotate counter-clockwise
EYaw rightRotate clockwise
HHover holdToggle altitude lock at current height
FCamera toggleSwitch between first-person and chase camera
TabNext formationSwarm mode — cycles Star, Circle, Heart, Diamond, Wave

Running the sim

You need Godot 4.6 installed. That's it. Clone the repo, open the project, and press play.

01

Clone the repo

git clone https://github.com/Kristians2324/Drone-Sim-Master.git
cd Drone-Sim-Master
02

Open in Godot 4.6+

Click Import, point it at Godot-drone-master/, select project.godot. The first import takes about a minute while it processes assets.

03

Press F5

The main menu loads. Pick Single Drone, Swarm, or Autopilot and you're flying.


What you need

Just Godot. Download the engine, open the project, and you're good to go.

Godot Engine

4.6+

The only hard requirement. Download from godotengine.org

A decent GPU

Vulkan

The sim uses Forward Plus rendering. Any GPU from the last five years should handle it fine.

OpenXR runtime

Optional

Only if you want VR. SteamVR or Monado both work. Not needed for desktop play.


VR and OpenXR

OpenXR is enabled in the project settings already. You just need a runtime running on your machine before you launch.

01

Start a runtime

Launch SteamVR, Monado, or anything else that exposes an OpenXR interface on your system.

02

Open the project normally

Godot detects the active runtime and enables VRManager automatically. Nothing to configure.

03

Put the headset on

You're in first-person. The same controls apply — throttle, pitch, roll, yaw.


Get the sim

Standalone releases ready to play for Windows, Linux, and macOS.

All standalone packages include 3D drone models, city buildings, nature assets, textures, and sound. Extract the zip and run the game.