Repository navigation
nav_swarm: without a worker, the frame steps the navigator at its own tick - #1530
Merged
Merged
Conversation
… tick In a browser without threads (GitHub Pages' arigl, which isn't cross-origin isolated), nav_city_drive's swarm ran seven times too fast. Its console said "nav_swarm: ... ticks_per_step: the step is not a whole number of clock quanta". Without a worker the swarm followed the clock with the training scene's step (ts.dt, 0.06 s), which is 7.2 of the suite's 1/120 s quanta, so the clock refused it. The follower kept its default period of one quantum, and each of those took a whole navigator step of 7. The world it steps has the hosts' tick (config_for: kSimTick, 7 quanta), and a sim_thread follows that. The frame's thread now does too. A threaded build (natively, cyberpcangel.com's isolated pages) was never affected. swarm_spec::worker (C++ only, not a prop; true by default) lets a host or a test step the navigator on the frame's thread where there are threads. Natively that path was unreachable, which is how this went unseen. Test AriadneSceneSwarm.StepsOnTheFramesThreadWithoutAWorker: 70 quanta are 10 navigator steps, and the agents move. With the old step it failed with 70 steps and the browser's message. It passed 20 repeats, and the scene swarm and cvcgl_ariadne_swarm suites pass.
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.
In a browser without threads (GitHub Pages' arigl, which isn't
cross-origin isolated), nav_city_drive's swarm ran seven times too fast. Its
console said "nav_swarm: ... ticks_per_step: the step is not a whole number
of clock quanta".
Without a worker the swarm followed the clock with the training scene's step
(ts.dt, 0.06 s), which is 7.2 of the suite's 1/120 s quanta, so the clock
refused it. The follower kept its default period of one quantum, and each of
those took a whole navigator step of 7. The world it steps has the hosts'
tick (config_for: kSimTick, 7 quanta), and a sim_thread follows that. The
frame's thread now does too. A threaded build (natively, cyberpcangel.com's
isolated pages) was never affected.
swarm_spec::worker (C++ only, not a prop; true by default) lets a host or a
test step the navigator on the frame's thread where there are threads.
Natively that path was unreachable, which is how this went unseen.
Test AriadneSceneSwarm.StepsOnTheFramesThreadWithoutAWorker: 70 quanta are
10 navigator steps, and the agents move. With the old step it failed with 70
steps and the browser's message. It passed 20 repeats, and the scene swarm
and cvcgl_ariadne_swarm suites pass.