- Newest
- Most votes
- Most comments
"..create a dedicated server for a match when a player searches for a game. And he closes it when the game is over."
-
GameLift does the first part for you, see CreateGameSession, StartGameSessionPlacement or the use of the GameLift match making serivce FlexMatch), GameLift will try and place on an existing server, or based on your confiugration provision another. GameLift handles auto-scaling for you and acts as the server manager.
-
The second part is more up to you. GameLift does not auto close a session when all the players leave as PlayerSessions are optional in GameLift. Its pretty trivial to add the logic to check if all players have left and then call
ProcessEnding
to autoclose the session.
Its unclear if you want to ask, how do I do this outside of GameLift. You could do this via EC2 and its autoscaling rules. You'd have to build a control plan, ie an Admin API, where you make requests and manage which server a request goes to etc. To build a one off may be possible, but if you need to add scale/volume/redundancy support then it would be a lot of work.
You can also use GameLift FlexMatch as a standalone part of GameLift which would give you matchmaking and you would be responsible for placing the sessions on your processes.
Hope that is helpful in some way.
Well I think my answer revolves around this: "You can also use GameLift FlexMatch as a standalone part of GameLift which would give you matchmaking and you would be responsible for placing the sessions on your processes." I had not thought of it. Thanks for that idea! I just thought about adding logic to the ProcessEnding, but I don't know if that's the best way to do it. If anyone has any other ideas, I will appreciate it!
Relevant content
- asked 6 months ago
- asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 3 years ago