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

Implement player id and session id #269

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

TheYellowArchitect
Copy link
Contributor

@TheYellowArchitect TheYellowArchitect commented Sep 2, 2024

This is the implementation of #256 which also solves #242 and #238

player_id is used here for projectile IDs. Though I place this in draft because fire() should become fire(avatar_player_id) so as to generate the unique id via the new method. But there is a conflict. The fire() input must be invoked by other players via input (so it should be THEIR player id, not local player id) and currently it fires only locally (the bomb projectile is synced via state, not by invoking the input fire()).

In simpler words, it stays as draft because a slight input refactor to have fire input passed into _inputs #253 is more important than this PR.

Anyway, as for player_joined_at_tick, it's not included here as it would make this class bloated and would have to introduce race conditions.

@TheYellowArchitect TheYellowArchitect marked this pull request as draft September 2, 2024 16:59
@TheYellowArchitect TheYellowArchitect changed the title Implement player id Implement player id and session id Sep 2, 2024
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