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

Improve SyncI #8891

Closed
wants to merge 4 commits into from
Closed

Improve SyncI #8891

wants to merge 4 commits into from

Conversation

BasedUser
Copy link
Contributor

@BasedUser BasedUser commented Aug 3, 2023

what

This PR increases the sync rate from 10 times per second (100ms) to 66.6 times per second (15ms).

why

You might want to sync some things a lot faster for precision (or other networking-related) reasons. However, there's no real point to synchronize anything faster than once every tick, because the vast majority of Mindustry players run at 60 FPS, and synchronizing a variable faster than that is wasteful. It also isn't a multiple-orders-of-magnitude level increase, your code would have to intentionally be bad (from a mapper PoV) in order for problems to occur.

I chose 15ms because it allows some more leeway with frametimes.

what's the worst that can happen

Bandwidth might increase up to 6x for badly written code. Not really within crashing limits, but still probably on the same importance as setblock and explosion spam (tested just now on a statistically average client-server pair)

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

@way-zer
Copy link
Contributor

way-zer commented Aug 5, 2023

Maybe just at most once pre tick?

@BasedUser
Copy link
Contributor Author

Maybe just at most once pre tick?

what do you think this does

@BasedUser
Copy link
Contributor Author

stale

@BasedUser BasedUser closed this Feb 8, 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

Successfully merging this pull request may close these issues.

2 participants