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.
Thank you.
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.
Is there any sample with UDP?
Relevant questions
GameLift Plug-in for Unity now available
asked 9 months agoLooking for Flexmatch process flow, How to and/or samples (Unity client)
asked 4 months agoGamelift Unity Ubuntu Build Failed
asked 2 years agoGameLift Sample Code
asked 2 months agoCreate client in Unity
Accepted Answerasked 5 years agoUnity plugin for Gamelift failing to deploy
asked 14 days agoException Running the Sample GameLift Code from AWS
Accepted Answerasked a year agoGameLift Hosting for existing game
asked 10 months agoHelp for implementing GameLift in Unity
Accepted Answerasked 2 years agoSupport for Unity 2019 in GameLift Realtime Client SDK
asked 2 years ago
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?