Repository navigation
Yield during sim_advance so mid-advance spawns get their models - #2006
Merged
Merged
Conversation
A 30 s sim_advance through Beacon Bastion's first wave spawned 18 raiders in one synchronous burst; their model groups stayed empty (bars drew, bodies never did) while the same wave reached with time_scale and normal frames mounted every model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RwsemkhoUGyeQkdkKFmUmw
Each yield can cost a full render frame (~3 s under software GL), so a 30 s advance with per-second yields outran drive's 30 s RPC timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RwsemkhoUGyeQkdkKFmUmw
Noisemaker111
enabled auto-merge
October 20, 2026 16:29
Owner
Author
|
Generated by Claude Code |
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.
After #2004, a 30 s
sim_advancethrough Beacon Bastion's first wave spawned 18 raiders whose health bars drew but whose bodies never did. Their scene groups stayed empty even 40 s later.shell/devtools/simStepper.ts:advanceSimulationis async and yields a macrotask every 200 simulated frames (10 game seconds). React can commit what the sim spawned along the way, so models mount as they would in play. It yields every 10 s rather than every 1 s because each yield can cost a full software-rendered frame (~3 s), and per-second yields made a 30 s advance outrun drive's 30 s RPC timeout.sim_advancereturns the promise; the agent bridge already awaits promise verbs. Tests now await and count yields.changes/sim-advance-yield.md.Root cause, narrowed down in the live scene: the raider GLB loads in 0.5 s (6 skinned meshes, 76 clips). With
time_scaleand normal frames every raider mounts 12 meshes. After a single synchronous 600-frame burst, every raider group had 0 children and no errors or fallbacks.Verification
bun test packages/shell/src/devtools— 36 pass, 0 fail;check-types— pass;bun run gen— ok;ship:preflight— oksim_advance 30then a 40 s wait gives bars but no raiders. Right: with it,sim_advance 30then a 45 s wait shows every raider rendered (with the scaled bars from Size world health bars to the entity on screen #2005):Generated by Claude Code