Skip to content

Question about wait_for_tick() function #6580

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

Open
Lamfurst opened this issue Jun 25, 2023 · 1 comment
Open

Question about wait_for_tick() function #6580

Lamfurst opened this issue Jun 25, 2023 · 1 comment
Assignees

Comments

@Lamfurst
Copy link

Hi everyone,

I have a question regarding the usage of the wait_for_tick() function in synchronous mode. After going through the discussion mentioned in #3283 , I understand that it's generally advised not to use wait_for_tick() in synchronous mode. However, I came across a video here, between 0:48 - 2:22, where wait_for_tick() is used in synchronous mode. I'm a bit confused about this discrepancy, and I would appreciate some clarification.

From my understanding, wait_for_tick() should typically be used in asynchronous mode to obtain a snapshot that can be later used in a callback function registered with on_tick(). This allows for handling and processing of the simulation data asynchronously. Could someone please correct me if I'm mistaken?

I'm curious to know if there are specific scenarios where using wait_for_tick() in synchronous mode is acceptable or if there might be any drawbacks or implications of doing so. Any insights or clarification would be greatly appreciated.

@Blyron
Copy link
Contributor

Blyron commented Apr 1, 2025

Basically

If you want sync mode were; client tick --> server tick --> client tick --> server tick --> client tick, you will need to use wait_for_tick()
if you do not care about syncronization of frames, you can just not use the wait_tick function.

Is this enough answer?

@Blyron Blyron self-assigned this Apr 1, 2025
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

No branches or pull requests

2 participants