Turn-based strategy games running game logic separately on the server and in the browser risk the two falling out of sync, letting a client desync into an unfair or exploitable state. High Command is a deterministic, real-time strategic wargame where the same core rules engine runs, verifiably identically, on both sides.

High Command

High Command is a two-player, turn-based strategic wargame — missiles, drones and jammers versus interceptors, fighters, radar and civil defence, played out over budgeted 5-turn phases. The interesting engineering problem isn't the game itself, it's keeping the rules engine trustworthy: if the server and the browser ever compute a different outcome for the same move, the game is exploitable.

How it's built

  • A single Python "core" module holds all deterministic game logic — no duplicated rules on the client.
  • That core is compiled to JavaScript with Transcrypt so the browser runs the exact same logic, not a reimplementation.
  • A parity test suite runs the same game states through both the Python and compiled-JS versions and diffs the results, catching any behavioral drift.
  • Django Channels over WebSockets drives real-time turn exchange between players; Celery/RabbitMQ handle asynchronous processing.

Technology

Django + DRF + Channels/Daphne on the backend, PostgreSQL and Redis for state and queuing, Celery/RabbitMQ for background work. The frontend is a pixi.js 8 canvas renderer built with esbuild. Dockerized, deployed on Railway.

Status: in active development — the deterministic core, Python/JS parity testing and real-time turn infrastructure are built; game content and matchmaking are in progress.