Adding/removing players from an active GameContext is unnecessarily complicated #25
Open
1 task done
Labels
help wanted
something you can help with
usability
ux/devx problem
z-project: engine
something in the engine itself
Currently, one needs to create a saved
GameState
, then modify that state's player list (by creating a new list as well as a new state, since everything isreadonly
/immutable), and then rehydrate that state into aGameContext
just to mutate the player list.Possible Solutions
GameContext
dynamicallyinstance void AddPlayer(PlayerRole, PlayerActor)
/instance void DropPlayer(PlayerID)
To Investigate
a0
gets breached out, the next person to join becomesa0
. (at least, in "game is empty" scenarios, needs some testing for whena1
still exists)Additional Notes
We shouldn't worry about the case of "a player leaves, then comes back" -- in-game doesn't allow this. If you're dropped from the game, you're out of that game.
The text was updated successfully, but these errors were encountered: