Commit Graph
9 Commits
Author SHA1 Message Date
adrien f2b52fc2b4 Added sound and credits, bombardment audio, and hid foreign production 2026-09-21 13:36:28 +02:00
adrien 4b634e4561 Rebuilt the fog of war a tile at a time
Marching into enemy territory changes visibility every step, and each change
rebuilt the whole on-screen fog band. A tile's fog depends only on its own
level and its six neighbours', so the exact dependency radius is one tile, far
tighter than the vision radius.

- Every tile owns a fixed slot in one fog buffer, so rebuilding a tile never
  shifts another's vertices and only the touched row spans are re-uploaded.
  _applyKnowledge now diffs the visible/explored sets and hands the renderer
  the changed tiles; buildFogTiles rebuilds them with their rings. On a 100x100
  map a frontier patch is ~3-4 ms against ~80 ms for the band.
- A pan that leaves the built rows now builds only the newly exposed rows, and
  the escape margin scales with the viewport, so dragging rebuilds rarely.
- _frame schedules the next animation frame before doing any work and catches
  an error, so a one-off failure can no longer stop the frame loop for good.
- Added tests for the per-tile patch and the incremental pan.
2026-09-21 11:06:44 +02:00
adrien eca9e39760 Added political and economic map modes 2026-09-19 22:40:24 +02:00
adrien 2c022d0cbb Reworked terrain relief, the ocean and the borders 2026-09-19 21:40:37 +02:00
adrien b514a19ecc Added a tilted orthographic camera looking north 2026-09-19 19:37:17 +02:00
adrien 08f1b2d154 Added textured terrain, procedural water and a blurred fog of war 2026-09-19 17:16:41 +02:00
adrien 3b4e19b451 Added a WebGL map renderer with a DOM fallback 2026-09-19 10:34:04 +02:00
adrien 168c365b87 Refactoring and clean-up 2026-09-17 22:35:42 +02:00
adrien 6a4ce1ca5f Split shared data, game state and UI into modules 2026-09-17 22:05:53 +02:00