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 is readonly/immutable), and then rehydrate that state into a GameContext just to mutate the player list.
Possible Solutions
- An API that allows players to be added/removed from the
GameContext dynamically
- e.g.
instance void AddPlayer(PlayerRole, PlayerActor)/instance void DropPlayer(PlayerID)
To Investigate
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.
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 aGameContextjust to mutate the player list.Possible Solutions
GameContextdynamicallyinstance void AddPlayer(PlayerRole, PlayerActor)/instance void DropPlayer(PlayerID)To Investigate
a0gets breached out, the next person to join becomesa0. (at least, in "game is empty" scenarios, needs some testing for whena1still 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.