Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualising one simulation step at a time #124

Open
ptheywood opened this issue Mar 13, 2023 · 2 comments · May be fixed by #129
Open

Visualising one simulation step at a time #124

ptheywood opened this issue Mar 13, 2023 · 2 comments · May be fixed by #129
Labels
enhancement New feature or request

Comments

@ptheywood
Copy link
Member

For visually debugging models, it would be useful to be able to run simulations a single step at a time, as in FLAME GPU 1.

Unfortuantely this is much more complex in FLAMEGPU 2 thanks to our simulation-rate independent visuasliation / multirthreading.

I.e. on pressing n (or some other character) or an associated controller binding, if the simulation is paused, run a single simulation step.

This would allow fast simulation upto an interesting state, then single stepping at the desired time.


It might also be nice to be able to say "pause on step 200" as well (mostly via the CLI?)

@ptheywood ptheywood added the enhancement New feature or request label Mar 13, 2023
@Robadob
Copy link
Member

Robadob commented Mar 13, 2023 via email

Robadob added a commit that referenced this issue Mar 26, 2023
This does nothing if the simulation isn't ready, e.g. if it hasn't completed a new step since the sim last paused.

Closes #124
@Robadob Robadob linked a pull request Mar 26, 2023 that will close this issue
@Robadob
Copy link
Member

Robadob commented Mar 26, 2023

It might also be nice to be able to say "pause on step 200" as well (mostly via the CLI?)

This would be relatively simple to implement, it merely needs the simulation to lock the pause mutex, and store the lock in the visualiser at the appropriate time. Possibly not thread safe, but likely harmless.

I had a quick attempt at doing the same inside the render loop, but it easily misses exact steps when the simulation is small/running fast. Hence, the need for the sim to block itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants