ReviewOS

craft-native/craft

[S3-009] Establish an executable graphics core and truthful capabilities

#390
Closed chris opened this 8 days ago ·
8 days ago

S3-009: Establish an executable graphics core and truthful capabilities

Parent and ownership

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

Problem and observable result

Extract tested raster operations without window dependencies. Unsupported operations return errors. Verify clipping, allocation, overflow, and alpha 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

Craft owns graphics, native hosting, and platform capabilities. stx owns compilation/reactivity. ts-css owns style semantics. Stacks owns build and release orchestration. The game consumes published contracts.

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

  • Extract tested raster operations without window dependencies.
  • Unsupported operations return errors.
  • Verify clipping, allocation, overflow, and alpha 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

  • Assert real pixels for primitive operations.
  • Reject successful no-op draw and shader paths.
  • 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

Fix and test the owning source repository, run its existing bun run release:patch when it is a Bun package repository, verify published artifacts, then install into Stacks and release Stacks when affected. Update the game from verified published packages. HomeOS uses its own build/source provenance.

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.
8 days ago

Implementation and verification are complete on main:

  • 9d9f3312 extracted the bounded standalone raster core; 7a357cf2 added textured sprites, terrain triangles and bitmap text; 4bbbcc75 documented the public contracts and limits; 614c5551 added bounded shared-view asset accounting.
  • Pinned Zig 0.18.0-dev.146+35accc06e. Graphics/renderer/GPU targets pass; the full Zig suite exits 0. SDK: 777 passing, 5 intentional skips; typecheck, package build and all 43 package-surface checks pass; Pickier reports 0 errors.
  • The linked adoption audit, stacksjs/the-settlers-iii-remake#24, is closed with retained execution receipts.

The only remaining completion gate is publication/adoption evidence. Release run 39804169474 is still running its iOS jobs; its Android software-emulator failure is a 20-minute stock-image boot/ADB-offline timeout, not a Craft graphics failure. I am not closing this until the release artifact is actually published and verified.

8 days ago

Completed and published in v0.0.296.\n\nEvidence:\n- Standalone bounded raster core: ; sprites/triangles/bitmap text: ; public contracts and limits: ; bounded shared-view accounting: .\n- Pinned Zig .\n- Graphics/renderer/GPU targets and full Zig suite pass; SDK 777/782 tests pass (5 intentional skips); TypeScript typecheck, package build, 43 publish-surface checks, and Pickier (0 errors) pass.\n- Release run 39804169474 passed after a targeted Android software-emulator rerun. The public release contains the Linux, Windows, and macOS archives plus SBOMs and manifest.\n- The linked adoption audit, stacksjs/the-settlers-iii-remake#24, is closed with retained execution receipts.

8 days ago

Correction to the release receipt above: the commit references are 9d9f331, 7a357cf, 4bbbcc7, and 614c555; the pinned toolchain is Zig 0.18.0-dev.146+35accc0. v0.0.296 is public with Linux, Windows, and macOS archives, SBOMs, and the release manifest.

Sign in to comment on this issue.