This project has been created as part of the 42 curriculum by smakkass.
Simulate and visualize drone routing on a user-defined map, ensuring safe, capacity-aware, and collision-free schedules.
The project parses a simple textual map format, validates graph constraints, computes per-drone paths with time-based reservations, and visualizes the result with an interactive UI.
Quick run (Make)
make runDirect run (Python)
python -m src --map <path-to-map>A three-stage flow — lexer, parser, validator — ensures map syntax correctness and semantic checks:
- Unique zones
- Valid colors
- Connectivity
- Start/end hubs
Uses a Dijkstra-like search over turns with a ReservationTable to prevent exceeding zone/connection capacity.
Each reconstructed path reserves zone and connection slots per turn, so subsequent drone pathfinding avoids conflicts, enabling simple greedy scheduling of multiple drones.
Renderer: Built with arcade. The visual flow converts internal Map / Connection / Zone objects into simple nodes and edges.
| Input | Action |
|---|---|
| Mouse | Zoom / Pan map view |
← / → |
Retract / Advance a turn |
M |
Toggle map view |
D |
Toggle drone view |
P |
Toggle info popup |
F |
Toggle fullscreen |
R |
Reset map view and turn |
Visualizing per-turn positions clarifies scheduling decisions, highlights bottlenecks (restricted zones, narrow links), and helps debug map definitions and drone interactions.
Fly-in/
├─ Makefile
├─ pyproject.toml
├─ README.md
├─ maps/
│ ├─ README.md
│ ├─ easy/
│ ├─ medium/
│ └─ hard/
└─ src/
├─ __main__.py
├─ classes.py
├─ simulation.py
├─ map_parser/
│ ├─ __init__.py
│ ├─ classes.py
│ ├─ lexer.py
│ ├─ parser.py
│ ├─ validator.py
│ └─ errors.py
└─ visualizer/
├─ converter.py
├─ visualizer.py
├─ map.py
├─ drone.py
├─ scaler.py
└─ constants.py
Parsing
Algorithm
Background Image
AI was used to add concise docstrings across the codebase and to draft this README.

