Skip to content

Fix black screen after deploys; add graphics quality option - #21

Merged
matthewcodergamer merged 2 commits into
masterfrom
render360/iphone-baseline-lowmem
Oct 10, 2026
Merged

matthewcodergamer merged 2 commits into
masterfrom
render360/iphone-baseline-lowmem

Conversation

@matthewcodergamer

Copy link
Copy Markdown
Owner

Black screen

Diagnostics showed crossOriginIsolated=false and SharedArrayBuffer=undefined, followed by "The object can not be cloned" while workers were starting. GitHub Pages can't send COOP/COEP headers, so the service worker adds them. After a deploy, Safari can load the start page before the updated worker controls it. The start page's "reload once" guard was per-tab, so it never retried.

  • The start page now reloads whenever isolation is missing, at most once every 20 s, so browsers that can't isolate (e.g. Private tabs) don't loop.
  • The game page does the same instead of starting the engine without threads.

Graphics quality

  • A Standard / HD / Max picker sits on the start page next to Play. The in-game ••• menu has a Graphics row that applies on next launch.
    • Standard: 540p, quarter-size textures. This is the previous behaviour and stays the default.
    • HD: 720p, half-size textures.
    • Max: full screen resolution, full-size textures. The start page warns this may run out of memory on older iPhones.
  • The chosen quality is included in Copy diagnostics.

Checks

  • node --check passes for pre.js and for the inline scripts in shell.html and pages-index.html.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft


Generated by Claude Code

…y option

After a deploy Safari can load the start page before the updated service
worker controls it, so the page has no COOP/COEP headers, no
SharedArrayBuffer, and the engine dies with "The object can not be cloned"
on a black screen. The start page used to reload only once per tab; it now
reloads whenever isolation is missing (at most once every 20 s, so browsers
that can't isolate don't loop), and the game page does the same instead of
starting without threads.

Graphics quality (start page segmented control, and "Graphics" in the
in-game ••• menu, applied on next launch):
- Standard: 540p, quarter-size textures (previous behaviour, default)
- HD: 720p, half-size textures
- Max: full screen resolution, full-size textures
The chosen quality is included in Copy diagnostics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
With the engine now asking for the page-sized mode (1168x540 on an
iPhone 11), CShaderDeviceMgrDx8::ValidateMode compared it with the GL
layer's fixed 640x480 "display mode" and refused it. SetMode failed,
CreateGameWindow returned false, ModInit failed and the engine exited
right after "[Render360 video] mode 1168x540" with RUN_OK and nothing on
screen. A browser canvas can be any size, so skip the windowed size check
on web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
@matthewcodergamer
matthewcodergamer merged commit 4a1b84e into master Oct 10, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
portal-iphone-staging — 53db3cda Deployed Oct 10, 2026 by matthewcodergamer via Deploy iPhone staging page #324
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.

2 participants