Repository navigation
Port Web runtime parity and sustained-performance fixes - #2
Merged
Merged
Conversation
Rotate the WebGL vertex-buffer ring once per presented frame, orphan the selected store with GL_STREAM_DRAW, and append all game and blit uploads at increasing offsets. This follows the bounded streaming-storage pattern corroborated by some100/th07 while retaining TH08's pthread and range-read asset architecture. Write converted vertices directly into the persistent frame queue and coalesce only adjacent triangle lists with byte-identical captured render state. This removes a temporary allocation and duplicate copy from every D3D-shaped draw without changing primitive order or authored timing. Extend ?perf=1 with repeating browser/worker/game pacing summaries and rolling renderer upload/submission maxima so late-session degradation can be diagnosed on real hardware. Permit manual branch Web builds to upload a provenance-gated test bundle without deploying it, and document the design tradeoffs and why TH07's fixed-step main loop is not copied wholesale.
Keep TH08's synchronous authored file boundary while asynchronously fetching the next 1 MiB thbgm.dat range. Sequential cache misses consume the pending ArrayBuffer when available; seeks and failed prefetches fall back to a direct Blob read, and only one future chunk remains resident. Extend opt-in diagnostics to label direct versus prefetched retail reads and report their worker wait time. This separates periodic browser File stalls from WebGL submission stalls during real-hardware endurance testing. Promote the Stage 5 Playwright probe into a parameterized repository script with pinned playwright-core metadata. It serves only the provenance-gated artifacts with isolation headers, uses caller-supplied retail files, injects a replay into session MEMFS, tests direct and proxy links in clean contexts, separates warm-up from measurement, and emits untracked JSON and screenshots. Use the current Node 24 upload-artifact action for manually dispatched branch test bundles and document the bounded prefetch and reproducible browser-test workflow.
Predict the next Blob cache miss from the number of complete 44,100-byte DirectSound notification reads that fit in the 1 MiB range. The previous physical-end prediction landed 34,276 bytes beyond the actual refill point, so every nominal lookahead was discarded as an offset mismatch. Document the request-aligned range boundary and preserve direct-read fallback for seeks, short reads, and failed prefetches.
Use a Web-only fixed-step accumulator so a late callback or a handled window message no longer causes the original-shaped one-update gate to discard logical time. Clamp catch-up to 100 ms, execute replay/input and sound processing once per authored calculation, and render once after the pending steps; native and VC7 paths remain unchanged. Keep browser rAF, worker callback, and authored calculation rates independent in diagnostics so catch-up cannot conceal a real presentation slowdown. TH08 intentionally does not claim TH07-style render interpolation without the corresponding previous-state model. Correct the retained Playwright probe to measure its window with page performance timestamps. Node-side wall time included delayed CDP result serialization after the frame snapshot and produced false 46--52 FPS reports even when exactly 600 or 1,200 frames advanced.
Run the modifier's deterministic simulation-tick scheduler inside every 60 Hz Web accumulator step. This keeps Double Time at its authored 3:2 simulation ratio while the browser presentation remains display-paced.\n\nCount each actual authored calculation for diagnostics, process sound once per simulation tick, and advance the render cadence once per presentation-time step, matching the existing native modifier integration.
- port target-evidenced background, ANM ownership, popup, RNG, bomb timer, and retry corrections into the Web runtime - fix modern array ownership and keep decrypted resource lengths aligned with returned allocations - bound LZSS output and validate score and replay sizes, offsets, and truncated inputs before use - reject unsupported shared-memory, canvas, and WebGL environments with actionable launcher diagnostics - remove redundant per-frame GL state calls and cap container builds at conservative single-job resource limits - document replay, Stage 5, performance, compatibility, cleanup, and verification boundaries
Extend the retained Playwright replay harness so th08-mods can exercise deterministic modifier selections in both direct and proxy presentation modes. Validate the emitted run manifest, Mirror mode selection, and the 1.5x Double Time simulation cadence independently from the browser presentation callback rate. Wait for runtime initialization before changing controls to keep the test reliable across slow hosts. Advance the recorded th08-web baseline to e3485ab after importing the runtime-parity and sustained-performance work. Keep every Docker invocation under the configured CPU and memory limits, use a mods-specific workflow artifact name, and update all manifest contract tests and package metadata accordingly.
The modifier smoke test loads each generated .js runtime through require(), while the retained Playwright harness already uses an explicit .mjs extension. Do not mark every repository .js file as an ES module: Node otherwise refuses the Emscripten CommonJS loader before the Wasm modifier manifest can be tested.
Explain how the generic 60 Hz Web accumulator composes with the portable Double Time scheduler, including per-simulation-tick audio processing and display-paced rendering. Document the modifier-aware replay command so later work can reproduce normal, Mirror, and Double Time validation without committing retail data. Record the provenance-gated CI artifact and four Stage 5 Chromium/SwiftShader measurements. Both direct and proxy presentation held 59.99 Hz normally and 59.99 callback / 90.38 simulation Hz with the heavy modifier set, with valid manifests, screenshots, and no recorded browser errors. State the missing canonical executable boundary and avoid any new VC7 exact-match claim.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
th08-webbaseline while preserving allth08-modsbehaviorValidation
python3 scripts/ci.pynode --check scripts/test-web-runtime.mjsnpm run test:web-runtime -- --helpbash -n scripts/build-web-game.shgit diff --check9a63638, also fully green and uploaded without deploymentHD+FL+MR(rotate-90)+NF+DT+HR+BS+NB: direct and proxy both 1,200 callbacks / 1,808 calculations, 59.99 / 90.38 HzEvidence boundary
The checkout does not contain canonical
resources/th08.exe, so this PR makes no new VC7 exact-match or aggregate reconstruction claim.config/claims.csvremains header-only. Retail DATs, replay files, reports, screenshots, and generated build trees were not committed; local generated artifacts were removed after validation.