ReviewOS

stacks/the-settlers-iii-remake

[S3-104] Establish large-world and native performance budgets

#100
Open chris opened this 9 days ago ·
9 days ago

S3-104: Establish large-world and native performance budgets

Parent and ownership

Parent epic: https://github.com/stacksjs/the-settlers-iii-remake/issues/16 Source owner: stacksjs/the-settlers-iii-remake. Master roadmap: https://github.com/stacksjs/the-settlers-iii-remake/issues/4.

Problem and observable result

Measure simulation, rendering, pathfinding, and saves. Record hardware and frame/memory/thermal budgets. Cover startup, input, and background behavior.

The current application is a browser prototype. Passing the Riverlands campaign does not establish original-game or native parity. This issue is complete only when its stated behavior has retained evidence.

Evidence and interfaces

Qualification consumes retained behavioral, visual, performance, security, installation, and distribution evidence. Compilation, uploads, or prototype victory alone do not prove completion.

Pin the inspected revisions and fixture hashes in the implementation evidence. Original-game observations govern rules and timing. JSettlers is implementation evidence, not an authoritative balance specification. Unknown values remain explicitly unverified.

Acceptance criteria

  • Measure simulation, rendering, pathfinding, and saves.
  • Record hardware and frame/memory/thermal budgets.
  • Cover startup, input, and background behavior.
  • The visible result agrees with the underlying simulation or platform state, including failure paths.
  • Tests exercise the maintained public interface and retain reproducible fixtures or execution receipts.

Test matrix

  • Run dense seeded economy and battle scenarios.
  • Soak native mobile and desktop sessions.
  • Exercise invalid input, cancellation or interruption, and repeated execution where this interface permits them.
  • Verify determinism/conservation for simulation changes and resource ownership/disposal for platform changes.
  • Run owning-repository lint, relevant type checks and tests. Capture actual native output for native capability claims.

Scope constraints

Implement this behavior as a complete verifiable slice. Do not silently expand into adjacent tickets or substitute simplified gameplay. Keep the shared TypeScript simulation, shared stx signals, and ts-css conventions. Native gameplay and HUD must not depend on a WebView. HomeOS reuse must not introduce a kernel dependency into the game. Existing unrelated edits and authored guidance must be preserved.

Blocked by

Upstream release and adoption

Application behavior belongs here. If a reproduction identifies a framework defect, repair and release its owning source first, update Stacks where affected, then install the verified packages here.

No node_modules edits, copied runtimes, generated-source string patches, fabricated globals, successful no-op implementations, or skipped release gates. Push tested conventional commits as Chris to the owning origin/main without coauthor trailers or force pushes.

Completion evidence

  • Implementation commits and relevant upstream issue links.
  • Exact checks and results, fixture hashes, and screenshots/native execution evidence where applicable.
  • Published package versions, downstream lockfile identity, and release receipts when affected.
  • Remaining limitations stated explicitly. Partial work does not close this issue.
7 days ago

The browser terrain-cache correction in #216 is complete and verified in full CI. Retention is bounded to 64 MiB and retired native canvases are released. The browser fixture measures actual retained dimensions, checks complete output beyond that budget, and verifies zero rebuilds on repeated minimum-zoom draws.

This is one resource bound. Total RSS/GPU memory, large-world frame-time budgets, thermals and native hosts still need their own measurements. The ongoing terrain raster correction is tracked in #215.

6 days ago

A full local unit run exposed a marginal 5,000-tick staffing/save/replay test under the existing five-second guard. CPU profiling identified repeated checksum multiplication as substantial cost. Combining the two FNV rounds for a zero UTF-16 high byte removes one multiplication without changing the checksum algorithm. Independent integer arithmetic checked all 65,536 code units across 16 boundary/seeded hash states, and the Unicode and staffing checksum goldens stayed unchanged.

The complete local run passed all 417 tests after the correction; CI also passed with the original guard and replay window. The full ten-minute browser battle passed too. This is measured browser/Bun progress, not a native staffing pass or an all-platform performance qualification.

Sign in to comment on this issue.