Skip to content

fix: Prevent startup rendering delay by waiting for first render state#1123

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-startup-rendering-delay-B0qId
Jan 30, 2026
Merged

fix: Prevent startup rendering delay by waiting for first render state#1123
braedonsaunders merged 1 commit into
mainfrom
claude/fix-startup-rendering-delay-B0qId

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

The terrain map was rendering before buildings, units, and minerals for a few seconds at startup. This was caused by the loading screen completing before entity data arrived from the game worker.

Changes:

  • Add waitForFirstRenderState() method to WorkerBridge that resolves when the first render state with entities is received from the worker
  • Update WebGPUGameCanvas to await this method after spawning entities, ensuring all game objects are ready before the loading screen fades out and the countdown begins

This integrates with the existing Phaser overlay countdown - entities are now guaranteed to be visible before the countdown starts.

https://claude.ai/code/session_013CXJ1mTpfxWUY7FHXT54gY

The terrain map was rendering before buildings, units, and minerals for
a few seconds at startup. This was caused by the loading screen completing
before entity data arrived from the game worker.

Changes:
- Add waitForFirstRenderState() method to WorkerBridge that resolves when
  the first render state with entities is received from the worker
- Update WebGPUGameCanvas to await this method after spawning entities,
  ensuring all game objects are ready before the loading screen fades out
  and the countdown begins

This integrates with the existing Phaser overlay countdown - entities are
now guaranteed to be visible before the countdown starts.

https://claude.ai/code/session_013CXJ1mTpfxWUY7FHXT54gY
@braedonsaunders braedonsaunders merged commit 164ad28 into main Jan 30, 2026
4 checks passed
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