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

Generate UEID for player on connect #18

Closed
DomonkosSuranyi opened this issue Feb 6, 2021 · 2 comments
Closed

Generate UEID for player on connect #18

DomonkosSuranyi opened this issue Feb 6, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@DomonkosSuranyi
Copy link
Collaborator

  1. Client sends a ConnectionRequest.
  2. Server creates a Player entity with UEID additional component.
  3. Server sends the UEID to the client as the ConnectionResponse.
  4. Client creates an entity with the components: Player, UEID.

UEID should contain a unique u64 ID

@DomonkosSuranyi DomonkosSuranyi added this to the 0.1.0 milestone Feb 6, 2021
@DomonkosSuranyi DomonkosSuranyi self-assigned this Feb 6, 2021
@DomonkosSuranyi DomonkosSuranyi added the enhancement New feature or request label Feb 6, 2021
@DomonkosSuranyi
Copy link
Collaborator Author

First intuition for implementation:
Server should have an UEIDSupplier resource. It is responsible to generate new UEID-s.
It should store the "highest reserved ID+1" which will be initially 0. When an entity is being deleted that has an UEID, this UEIDSupplier should be notified, because it has to free the deleted UEID.
In this case the freed UEID should be stored in a sorted collection to know that this UEID can be reused.

Downside:
When an entity dies, UEIDSupplier must be manually notified to free its UEID

@DomonkosSuranyi DomonkosSuranyi added this to To do in Board via automation Feb 6, 2021
@DomonkosSuranyi
Copy link
Collaborator Author

no need for ID reuse yet

@titapo titapo moved this from To do to In progress in Board Feb 7, 2021
Board automation moved this from In progress to Done Feb 10, 2021
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
Board
Done
Development

No branches or pull requests

1 participant