Skip to content

feat(isometric): downscale droid workers before WASM load#8116

Merged
h0lybyte merged 1 commit intodevfrom
trunk/iso-droid-downscale-1773668854
Mar 16, 2026
Merged

feat(isometric): downscale droid workers before WASM load#8116
h0lybyte merged 1 commit intodevfrom
trunk/iso-droid-downscale-1773668854

Conversation

@h0lybyte
Copy link
Member

Summary

  • Adds inline script to the isometric game Astro page that calls window.kbve.downscale() before WASM pthreads load
  • Polls for window.kbve availability (max ~5s, 100ms interval) since droid may initialize after the page script runs
  • Gracefully handles cases where droid isn't present (timeout, no error)
  • No changes to the isometric game code itself — only the Astro wrapper

Test plan

  • Verify isometric game still loads and runs correctly
  • Check browser console for [Isometric] Droid downscale failed — should not appear
  • Confirm droid canvas worker is terminated before WASM init (check window.kbve.scaleLevel() returns 'minimal')

Adds inline script that polls for window.kbve.downscale() and calls it
before the isometric game WASM loads, freeing worker threads for pthreads.
@github-actions
Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@h0lybyte h0lybyte merged commit 8cf182f into dev Mar 16, 2026
5 checks passed
@h0lybyte h0lybyte deleted the trunk/iso-droid-downscale-1773668854 branch March 16, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant