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

Decrease memory usage when sharing host World state. #60

Open
guerro323 opened this issue Dec 1, 2020 · 1 comment
Open

Decrease memory usage when sharing host World state. #60

guerro323 opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@guerro323
Copy link
Owner

(not related to multiplayer networking)

Right now, serializing a world state take a lot of memory on a real game:

  • Some useless data are added (for example Links array that could be totally removed when sending data)
  • Archetypes and Component Types information are sent every frame (no caching)

Proposed changes are:

  • Remove Component Links write/read, and let the user know which entities are in which ISerializer.
  • Cache archetypes and component types information, but I personally think they should be sent in another message (since the client can sometimes not process a frame of data for performance reasons; and this mean we will need to create data for each connected client...)
  • Use BitBuffer instead of DataBuffer, which support delta encoding, zig-zag encoding, etc...
  • Implement custom serializers (it's already the case, but it's kinda hard to add one) and an easy way to not serialize a component.
@guerro323 guerro323 added the enhancement New feature or request label Dec 1, 2020
@guerro323 guerro323 self-assigned this Dec 1, 2020
@guerro323
Copy link
Owner Author

Current Progress:

  • Remove Component Links write/read, and let the user know which entities are in which ISerializer.
  • Cache archetypes and component types information, but I personally think they should be sent in another message
  • Use BitBuffer instead of DataBuffer, which support delta encoding, zig-zag encoding, etc... (I don't think this one will get added)
  • Implement custom serializers and an easy way to not serialize a component.

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

No branches or pull requests

1 participant