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

Send updates only when attributes change #21

Closed
Ulydev opened this issue Jan 29, 2017 · 2 comments
Closed

Send updates only when attributes change #21

Ulydev opened this issue Jan 29, 2017 · 2 comments

Comments

@Ulydev
Copy link

Ulydev commented Jan 29, 2017

It would be a great improvement in performance and bandwidth usage if the server only sent updates of attributes that have changed, e.g. position or velocity.
Right now it's sending the whole DynamicObject even if it hasn't moved since the last update.

@namel
Copy link
Member

namel commented Jan 30, 2017

As a first implementation, I'm changing the server to send updates
for objects which have changed. i.e. if at least one attribute changed, the object
will be broadcast.

This is not as optimal as suggested, but actually works better on games
which are position-sensitive. By assuming that the entire netscheme is transmitted,
we don't need to flag which attributes are included in the event. And the
object gets tightly packed.

The fix will also send a "complete sync" when a new player has joined.

@namel namel closed this as completed Jan 30, 2017
@namel
Copy link
Member

namel commented Jan 30, 2017

Fixed with commit 858fe60

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