Skip to content
/ drones Public

Interactive HTML5 canvas simulation of radar detection and drone interception (real-time loop + HUD).

License

Notifications You must be signed in to change notification settings

dnpjr/drones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Drone Radar Interception Simulation

Interactive HTML5 canvas simulation of a radar tower detecting and intercepting incoming drones.

A lightweight browser-based demo showcasing:

  • Real-time animation loop
  • Steering dynamics & simple interception logic
  • Collision detection
  • Radar sweep detection mechanics
  • Responsive world-to-screen scaling
  • Clean separation of simulation and rendering logic

Live Demo

Deployed via GitHub Pages:

https://dnpjr.github.io/drones/


Overview

This project simulates a fixed radar tower that:

  1. Sweeps a detection beam
  2. Detects incoming drones within range
  3. Assigns defender drones
  4. Intercepts targets using basic pursuit dynamics

The goal is not physical realism but to demonstrate:

  • Event-driven simulation
  • Object lifecycle management
  • Deterministic update loop
  • Basic game-style architecture in vanilla JavaScript

Technical Highlights

Language: HTML / CSS / JavaScript
Rendering: HTML5 Canvas (2D context)
Dependencies: None (pure browser implementation)

Core Components

  • World coordinate system
  • View transform & responsive scaling
  • Radar beam geometry
  • Target ownership logic (1 defender per enemy)
  • Separation forces
  • Collision handling
  • HUD overlay

The simulation runs via requestAnimationFrame with a fixed-time step cap.


Run Locally

Quickest

Open index.html directly in your browser.

Recommended (local server)

python -m http.server 8000

About

Interactive HTML5 canvas simulation of radar detection and drone interception (real-time loop + HUD).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages