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

fix rate at which multiplayer images are sent to 20fps #1379

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

jwunderl
Copy link
Member

@jwunderl jwunderl commented Oct 19, 2022

It felt like way too many messages were going through so I poked around for a bit, due to some pretty weird lifecycle stuff in simdriver we actually end up initializing multiple times (I didn't look too closely but it appears to be a bit of a race -- e.g. when I just logged out I saw upwards of 4-5 calls to init like this but when I set breakpoints I only saw it repeat once or so), and this setInterval was getting recreated multiple times and sending upwards of 100 frames / a second.

The frame sending logic is independent of the individual sim runtime either way, so limit to a single setInterval in the scope of the frame

@jwunderl jwunderl merged commit f9de8f5 into master Oct 19, 2022
@jwunderl jwunderl deleted the fixRateOnMultiplayerImagePosting branch October 19, 2022 23:00
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.

3 participants