Game loop diagram (from the French report): drone phase, grid update, storm phase, and collision handling

Programming · 3/10

Drone rescue game

Built with a partner, Ilyane Haida: a rescue game on a 12x12 grid, where drones must locate survivors and deliver them to a hospital while avoiding storms and buildings, under battery-life constraints.

Play directly in your browser: this widget actually runs the Python script below (unmodified, fetched live) using Pyodide (CPython compiled to WebAssembly), nothing to install. Moves are entered in the field that appears below the grid, which stays visible the whole time you're answering.

Game rules:

  • 12×12 grid: columns A to L, rows 0 to 11.
  • Symbols: B building, H hospital, S survivor, T storm, D drone.
  • Each turn, move up to 3 drones by one square (diagonals included) to pick up survivors and bring them to the hospital.
  • Each move costs 1 battery point (+2 to pick up a survivor); battery recharges at the hospital.
  • A storm disables any active drone it touches while moving, for 2 turns.
  • +1 point per survivor delivered to the hospital. The game ends when all survivors are saved, all drones are down, or after 40 turns.
  • To play: enter the ID of the drone to move (or f to end the turn), then its destination as column row (e.g. C 5).

Architecture

The program is structured in five parts: configuration loading (JSON), random entity placement, display functions, the movement/rules engine, and scoring, documented in detail in the project report.

Documents

See all projects