The city buildings tab and the HUD's tile panel now draw the same card: an icon, name and status, a bottom-anchored button carrying the estimated price and build time, a quiet remove control and a hatched locked state, with the produce/consume/cost detail in a hover tooltip. The shared card lives in client/js/ui/card.js.
The tile dock is now a summary — description, production, people and their ethnic makeup, GDP and the improvements list — with a Management button that opens a full-size panel like the city and nation panels. Its Improvements tab holds the grouped Military, Transportation and Economic cards, so Road and Railway sit with the other works. City buildings sit in a two-row horizontal scroller with the built ones first, and the city panel now matches the nation panel's size.
AGENTS.md now asks for a minimal visual preview to be shown before a player-visible change is committed.
Rebalanced the resource rules so nothing is priced primarily in money: steel, electricity and high-tech lead every construction bill, chip foundries are seeded everywhere instead of being hand-placed, and cities open with stores of steel and high-tech. City building rows now lead with the resource bill and keep the money as an aside, and the region's resources expand into the buildings that demand them. Pulled the graph and cost maths into a framework-free shared/economy_graph.js, quoted currency through one helper, and gave every data table the same striping and row highlight.
City building orders now keep their production-queue slot but open in a materials phase: the order reserves the market value of its steel and high-tech, buys from the nation's own stores and reachable suppliers once a day, and only joins a construction line once the bill is settled, so a city with no supplier simply waits. The queue, the city panel and the quick view show the gathering progress instead of a stalled bar.
Buildings and tile improvements now take a tenth of the old time; unit training is untouched. Any material money left over is returned when the work completes.
World generation now aims at a fixed share of the ice-free tiles (60%) instead of a minimum continent count, bisecting the water level for it rather than sweeping every step, and still joins the ocean into one body. Ice and tundra are the outermost rows only, scaled down on small maps so the fixtures keep usable land.
Cities score their site, coastal plains best and landlocked worst, avoiding tundra and desert. Every nation that holds a coast gets a port city on each island it owns, and any landmass left empty is settled by the nearest nation, so no land starts unowned. A coastal city opens with a port already built.
Bundles the in-progress work in the tree: the commodity monthly price series and inflation the central bank's chart reads, and the rolling city-to-city migration graph the population map draws as flow arrows.
Production buildings are now independent private-sector agents: they keep what their output sells for, run only to the demand they can actually sell, and spend that cash on steel and high-tech upgrades when their demand grows. Grid power is a paid private flow between plants and their consumers, and regions synthesise the food their own harvest and the reachable market cannot supply.
Island regions no longer famine: a region with no reachable supplier grows its whole shortfall from energy, and grid power now feeds cities and food before the converters, so a famine never waits on a factory.
Bundles the in-progress tree cleanup that was already present in the working tree.
- Five resources (energy, steel, food, luxury, high-tech) with per-city stores, a world market, delivery and material upkeep.
- Resource-producing tile works built outside cities; every nation opens with the works its economy needs.
- Real game-icons.net art replacing the dummy icons for the new resources and works, with the credits updated.
- An aircraft now returns to the nearest friendly airport instead of always its original home, so a plane rebased to a forward airfield can strike targets beside it; the browser mirrors the rule.
- A pillage's popularity cost is an instant shift that drifts back, not a generation-long grudge. Popularity and approval read the base opinion, while the grudge stays as the diplomatic memory.
- Doubled aircraft range: the fighter's effective reach is now 25 tiles and the bomber's 50, with missionRange raised to match.
- Political map country names were invisible because the label SVG had a zero-sized viewport, which some browsers never paint; size it to the world and guard it with a test.
- Added a Devlog button showing the ten latest commits, generated into client/js/devlog_data.js by scripts/generate-devlog.js and refreshed by the pre-commit hook.
- Worked through FIXME.md: the city button and a unit double-click now open the city, and the stat tooltip escapes the HUD so the unit panel cannot cover it.
- The server creates its game at startup and clients only join it; the Create game screen and the configure_game path are gone, and testing is a --testing server flag.
- A page on a loopback host signs in as adrien, claims France and gets the free, instant testing buttons, while the server grants free orders only to a loopback socket whose Origin is also loopback.
GDP per capita had no natural growth, so a nation's economy only moved
when population, buildings or war did. The summary stats also offered
inconsistent hover text: a native browser tooltip for popularity and none
at all for the budget.
- Every land tile now gains a constant 0.01% of the GDP per capita it
opened with, once a day. Because the amount is fixed the relative growth
rate tapers over the years. Each tile's opening figure is snapshotted
once and shipped to the browser, so the tile panel and the GDP-per-capita
map mode stay in step with the server.
- The population, GDP and GDP/capita tooltips show the relative growth:
against 1 January 2000 through the first year, then year on year. The
monthly captures now keep a rolling thirteen months for the baseline.
- Every summary stat explains itself through the same custom bubble.
Popularity's native title moved onto it, and Budget forecasts the next
calendar month at the current hourly net, as a compact figure such as
"+€3.28B/mo" (hoursInNextMonth follows the real calendar).
- The tile GDP breakdown shows gains with a plus sign (natural growth,
ports) rather than the old minus.
Added tests for the constant daily gain, the falling relative rate, the
first-year and year-on-year baselines, the snapshot baseline, the budget
forecast and the calendar month length.
The catalogue had grown a barracks, wartime shelters, an air-defense
battery, a warm-water port and a shipyard, but only as data: infantry
still trained without a barracks, shelters did nothing, and an airport was
just an airbase. Each building now names the rule it grants with a
`mechanic` id, so the simulation and the city panel describe the same
thing without magic strings.
- Barracks and shipyards open one more production line each. A line sticks
to one entry at full rate, so two units build at once rather than the
head absorbing every line; the base behaviour (one queue, overflow
carrying into the next entry) is unchanged.
- Wartime shelters keep 10% of civilians per level safe from bombardment
and are very hard to knock down, and ranged fire can now destroy a
building level outright, with no refund. Each building rolls its own
chance per point of damage, from a generator seeded off the world so a
bombardment replays identically.
- Air defense fires one volley at a hostile aircraft the moment it enters
the city tile, scaled by its level; a plane shot down never drops its
bombs.
- A port adds 1000 GDP per capita per level, per adjacent sea tile, to
every tile in its region.
- An airport draws a daily trickle of people from every other airport city
in the world, scaled by the destination's level.
- Wired the new effects into the city panel and taught the repeatable
Industrial Automation to satisfy other technologies' prerequisites.
Added tests for each mechanic and for the parallel lines.
- 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.
- the nation summary shows own-government approval, white in the neutral 40-60% band, red below and green above
- the city and government panels keep a fixed size per tab, dock below the summary and no longer cover it, and their tab bar wraps instead of being clipped
- propaganda campaigns grow exponentially harder near their opinion ceiling or floor, so the last percent are the hardest to win
- memoised city, nation and matrix approval against the politics version, invalidated by territory redraws, so snapshots stop recomputing it every frame
- extracted the duplicated modal tab wiring into modals/tabs.js
- tests: campaign-difficulty, approval-colour and cache-invalidation cases (513 pass)
- 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
- 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
- run_tests.js discovers and runs each *_test.js in its own worker process
(--jobs N to cap the pool, --file <name> for a single suite)
- GameState caches the deterministic terrain, city sites and road network by
(seed, mapConfig, civ count), rebuilding only the mutable per-game state
- the snapshot ships mapConfig and the client rebuilds terrain from it, so the
DOM tests can use the small map fixture and a non-default config renders right
- shortestPaths can stop once every target city is settled