GameLift Sample Code
Does a collection of GameLift service samples exist? I'm developing a Battle Royale game in Unity using the Unity Plugin for GameLift and I have the basics functioning.. starting with CloudFormation template deployment, FlexMatch with game session queue, and automatic backfill. Now I'm starting to build a Lobby system, where a player can create/join/apply to join/invite to join other online clients.
This seems like something that should exist in sample code (CloudFormation template, Lambda files, DynamoDB tables, SNS Topic Event Handlers, etc.). Does it?
I may have it built and working by the time I get a response here, but here's what I'm thinking.
LobbyTable LobbyId PlayerId # lobby owner TicketId # matchmaking ticket id
PlayerLobbyTable PlayerId LobbyId
Lambda functions to handle setting up a table items when a player: creates a lobby # creates LobbyTable item for PlayerId as owner application/invitation is accepted # creates PlayerLobbyTable item for PlayerId leaves/booted from lobby # deletes PlayerLobbyTable item of leaving PlayerId, picks new lobby owner and assigns if anyone remains in lobby or deletes LobbyTable for LobbyId if no players remain change lobby owner # changes LobbyTable PlayerId to new lobby owner update matchmaking ticket id # when FlexMatch MatchmakingSucceeded event, add IpAddress, Port, DnsName, etc. attributes to LobbyTable item, send message to all players in lobby that the matchmaking succeeded.
We have a great example of an serverless backend with AWS Gamelift that uses FlexMatch. The example has been written for Unity and also contains a C++ example aswell. In this sample you can view the Cloudformation templates used to deploy the backend and game servers.
You can see find the Multiplayer Session-based Game Hosting on AWS sample on Github.
Just leave a comment below or post a new question if you need more help.
I already have a FlexMatch game system working. I'm specifically asking about a Lobby system. Is a lobby system part of this example you've referenced?
Is there any sample with UDP?
GameLift Plug-in for Unity now availableasked 9 months ago
Looking for Flexmatch process flow, How to and/or samples (Unity client)asked 4 months ago
Gamelift Unity Ubuntu Build Failedasked 2 years ago
GameLift Sample Codeasked 2 months ago
Create client in UnityAccepted Answerasked 5 years ago
Unity plugin for Gamelift failing to deployasked 14 days ago
Exception Running the Sample GameLift Code from AWSAccepted Answerasked a year ago
GameLift Hosting for existing gameasked 10 months ago
Help for implementing GameLift in UnityAccepted Answerasked 2 years ago
Support for Unity 2019 in GameLift Realtime Client SDKasked 2 years ago