Commit Graph
14 Commits
Author SHA1 Message Date
adrien c8260b2108 Better tile building management 2026-09-22 19:50:00 +02:00
adrien b2ab4d76eb Sped up large battles and trimmed snapshot traffic
- The bombardment overlay was rebuilt every animation frame, and each barrage
  scanned the whole army to find its target (O(strikes x units)). It now
  redraws at most at the renderer's 24 fps, reuses its SVG/DOM nodes, and
  resolves garrisons from one per-snapshot tile index, so a high-refresh
  display no longer makes a big battle worse.
- Route truncation had the same shape: every step of every route rescanned
  every unit. The snapshot now buckets the army by tile once.
- Idle units no longer have identical left/top rewritten every frame, and the
  whole-map fog buffer is rebuilt less often.
- Snapshot traffic: cityStats and visible are delta-encoded like territory and
  population, city stats carry a content-hash version, tile ethnicity is
  memoised, and a city's economy is derived once per broadcast instead of
  twice. A per-peer civ change now forces a full snapshot, since the visible
  set is per-viewer.
2026-09-21 02:23:04 +02:00
adrien ede258d39f Added warfare depth, focused research and a reworked HUD
- Tile improvements (fortifications, radar towers, coastal cannons), trenches,
  zone of control, support-unit capture and launch transports, with parabolic
  barrage arcs drawn between attacker and target.
- Focused research that pours points straight into the chosen technology, with
  per-technology progress kept when the focus changes, plus repeatable levels.
- Popularity reworked to integer points, war and pillage effects, minority
  policies and month-over-month arrows on the nation summary.
- City progress bars, square improvement buttons, a technology tab of wide
  short cards with progress bars, transport cargo readout and double-click to
  open a city panel.
2026-09-21 01:07:36 +02:00
adrien e71b1b1aa4 Added buildable roads and railways drawn as winding textured links 2026-09-20 20:43:10 +02:00
adrien 34e755d1a4 Optimised snapshot traffic and map rendering 2026-09-20 01:07:03 +02:00
adrien b514a19ecc Added a tilted orthographic camera looking north 2026-09-19 19:37:17 +02:00
adrien 3b4e19b451 Added a WebGL map renderer with a DOM fallback 2026-09-19 10:34:04 +02:00
adrien cf75b31e68 Fixed air strikes against garrisons and the round-trip fuel model
- a strike is accepted only when the whole round trip (out to the target, then
  home to a friendly airport) fits the remaining fuel, and the browser mirrors
  the check so an unreachable target is refused with its distance and the
  plane's effective range
- a bomber that bombs between hourly ticks turns for home at once instead of
  idling and crashing on an empty tank; a plane with a runway lands on fumes
- aircraft may now target a garrison inside a hostile city: they bomb it and
  turn away, and captures skip aircraft so the city is never taken
- bomber/jet endurance and mission-range tuning
2026-09-18 22:46:19 +02:00
adrien 1a9d48cdc9 Added aircraft sorties, artillery bombardment and local testing mode
- aircraft attack orders fly a sortie to the target, bomb once, return to a
  friendly airport and re-arm (two-day cooldown, charged per aircraft); rebasing
  is bounded by fuel rather than the 10-tile combat radius
- artillery and warships open a sustained hourly bombardment on a standing
  target, drawn as a red dashed line and ring while either endpoint is selected
- a game launched from localhost can enable a testing mode whose train and build
  rows offer free, instant orders; the server only honours them for a loopback
  admin in a testing game
- an open city panel now unlocks aircraft as soon as an airport finishes
2026-09-18 21:55:30 +02:00
adrien 2377489d4a Added building icons, ports, airports, shipyards and air/naval units 2026-09-18 20:00:09 +02:00
adrien 3acd2487df Added roads, regional taxation and a reworked budget view
Roads are pre-generated between cities with a greedy geometric spanner and flatten unit movement cost. City improvements now only affect the tiles their region controls, with per-region tax collection and a Cities tab. The budget is a grouped, scrollable table with 25%/year tax and a 10%-of-GDP opening treasury. Also merged the tile info into the city panel, kept conflict and budget expansion state across snapshots, added join notifications, filled border corners, drew battle sides as stacks and made tab overflow scroll.
2026-09-18 07:11:59 +02:00
adrien da1d443807 Improved tile information, optimized stack pathfinding 2026-09-18 05:56:54 +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