Skip to content

Implement player id and session id#269

Closed
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
TheYellowArchitect:player-id2
Closed

Implement player id and session id#269
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
TheYellowArchitect:player-id2

Conversation

@TheYellowArchitect
Copy link
Copy Markdown
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
@elementbound
Copy link
Copy Markdown
Contributor

Thank you for the contrib but I would not like to add this feature at this point - more details in #256.

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