ReviewOS

stacks/the-settlers-iii-remake

Remember last-seen terrain and map objects under fog

#222
Closed chris opened this 6 days ago ·
6 days ago

After land has been explored and then leaves sight, the production renderer still reads its live landscape, elevation and map-object fields. This can reveal changes the player has not seen. The pinned reference records hidden landscape/height/map objects and has its graphics grid return those remembered values while the tile is hidden.

A retained actual-browser reproduction uses public scenario setup and commands. A swordsman discovers the desert at 40,40, walks to 65,65, and leaves it explored but not visible. The rival then casts Grassland Galore, paying manna supplied by two normally completed large temples. The viewer's tile stays visible=0, explored=1, but its displayed pixel changes from 79,60,21,255 to 50,53,4,255. The unseen world changes from desert to grass at ticks 210/211. Painting leaves simulation checksums unchanged, renderer disposal is clean, and the browser records no console, request or collection errors. No sight, terrain, faith or clock state is directly patched. Original rasters remain private.

Source owner: game player visibility state, public player views, saves/replays, scene, terrain renderer and minimap. Parent #88; related #38, #28, #92 and #94. Depends on #220, which establishes current source-material selection and its regression baseline.

Pinned implementation evidence, not original Gold observations:

  • FogOfWar.java: recordHidden, clearHidden and the hidden landscape, height and map-object snapshots.
  • MainGrid.GraphicsGrid: getVisibleLandscapeTypeAt, getVisibleHeightAt and getVisibleMapObjectsAt return those snapshots while hidden.

Acceptance:

  • Retain the red troop-movement/rival-intervention/actual-browser reproduction at the established public seam.
  • Remember each player's last observed landscape, elevation and supported map objects when sight leaves. Hidden changes must not refresh that memory; renewed sight must refresh it from the actual world. Never fabricate history on first draw.
  • Read the appropriate player memory in terrain geometry, material selection, lighting dependencies, scene and minimap. Preserve filtering of unseen foreign units, goods and diagnostics.
  • Cover terrain conversion, grading, object removal/growth, two independent viewers, loss and renewal of sight, initially unexplored land and late first rendering. Pin reference behavior and make unsupported map-object memory explicit.
  • Persist and validate the required player memory through saves, restore, checkpoints and deterministic replay. Preserve every published earlier rules profile and its identity; do not silently reinterpret old saves.
  • Keep allocation/cache ownership bounded and disposed. Retain existing clocks, replay windows and test guards. Verify actual 1x/2x pixels and no hidden-state leakage at maintained public interfaces.
  • Run source integrity, lint, types, full units, production build and all browser gates. Qualify the pushed version and original diagnostics before closing.

This issue concerns remembered world presentation. Exact temporal fog fading, original Gold timings and native renderer parity remain separately unqualified.

6 days ago

Player-owned observations now retain landscape, elevation, object quantity/growth pose, building poses, goods piles and survey-marker poses when sight leaves. Renewed sight clears them. The terrain painter uses that same knowledge for geometry, source-image selection and north-height lighting; the scene and minimap use it too. Map picking follows the displayed elevation. Known-route and harvesting forecasts reuse the ordinary router with remembered inputs, while actual movement continues against the real world.

The maintained browser reproduction passes at both 1x and 2x. The unseen rival conversion retains the independently decoded desert pixel, including a late first draw and save/reload. An additional real-digger scenario compares the original known-height patch byte-for-byte across cached, fresh and restored renderers and verifies picking at the remembered vertex. These checks cover 772 physical pixels at 1x and 3,076 at 2x, without changing world state while painting or retaining disposed rendering resources.

Public-session tests also cover real grading, growth, tree harvest, demolition, pile changes, survey-marker expiry, independent viewers, renewed sight, deterministic replay, malformed snapshots and explicit mission exploration grants. Published 0.14 rules are frozen with their previous identity; old states are never given invented observation history. The full unit/build/browser gates and pushed-version qualification are still running. This does not establish original Gold observations, temporal fog fading or native rendering parity.

6 days ago

Remembered-world behavior is delivered and verified in CI. Players retain the landscape, height, persistent object poses, buildings, piles and survey markers they observed. Hidden changes stay frozen until renewed sight. Terrain drawing, minimaps, map picking and known-route/harvesting forecasts use the same knowledge. Old published profiles remain available with their original identities.

The pushed build passed 426 unit tests and all 16 production browser suites, with 546 recorded steps and no console, request or collection errors. Actual 1x/2x rendering checked 128,815 and 131,119 pixels, including real unseen conversion and digger grading across cached, newly created and restored renderers. The full battle retained its 600,000 ms wait and completed in 611,229.53 ms. The original diagnostic ZIP, every CRC and its GitHub digest were verified.

The receipt records the pinned remake sources and local qualification. The CI qualification is appended with the next logical source change. Original rasters remain private. Temporal fog fading, original Gold observations and native parity remain separate work. The production UI keyboard follow-up is #224.

Sign in to comment on this issue.