There seems to be a chicken and egg scenario when it comes to Maps in a GameLift solution. This seems like a really fundamental aspect of the solution that I can’t seem to find any documentation on.
The question is: How do you start a session with a specific map? There are 2 scenarios.
For instances that have not yet been started. The solution would seem to be, as part of
StartGameSessionPlacement, if GameLift looked through
GameProperties for special
keys and added them to an instances startup parameters. I can’t find any evidence or documentation of this. Am I missing it? Is this an actual thing/feature that exists? Are the keys documented anywhere?
In the case of already existing auto-scale instances that are not yet activated, we need a different solution. For instances in this category, it seems that the expectation is that we should transition the server to the new map before calling
The fundamental problem is: How do we preserve the GameLift state during this transition? GameMode is not preserved on level transition, seamless travel or not. And different maps have different GameModes, so the expectation should always be that GameMode will go away on travel (because it does and there’s literally no changing that). Where does that leave
GameLift and its current state waiting for
ActivateGameSession to be called?
Since the entry point for GameLift is
GameMode, the only way to preserve any data across map changes would be:
- Stuff it into the
GameInstanceand perform seamless travel (could be any arbitrary data)
- Pass it via URL parameter to the new map (only valid for strings)
How do we save/restore the GameLift state across map/gamemode transitions?