Tutorials and Resources
- AWS
- GameLift
- Unity Multiplayer with Realtime GameLift (architecture overview and setup, watched up to minute 7:00 so far, starting Lambda setup)
-
Notes
Architecture Overview

- Potential change we might want to make: use FlexMatch instead of manually searching for game server. FlexMatch is used by Second Dinner.
- API Gateway is the “Gatekeeper” of all HTTP requests before passing them onto the appropriate lambda function
- Lambda handles actual implementation of searching, joining, creating game sessions
- In his previous videos, this functionality was done in Unity C# scripts, but to more closely emulate Second Dinner’s structure + for best practices, we’ll be doing it with Lambda, like he does in this new video
- Also more secure this way! Maybe worth highlighting in presentation
- What does the GameLift service itself actually contain?
- Internal GameLift services and our Realtime Script
- Realtime Server Script: custom code deployed to GameLift acting as backend server
- Realtime Client: A script in unity that communicates with the Realtime Server Script
- SQS (Simple Queue Service) and SNS (Simple Notification Service)
- Used to handle any any all notifications (game session fulfillment, didn’t find a game session and need to create it, etc.)
- SNS Generates the message, which gets sent to SQS (SQS is subscribed to SNS), and Unity client subscribes to SQS.
- SNS, upon successful creation of a game session, also handles sending the message telling Unity that the session is ready + the info for connecting to that session
Flow of Obtaining a Game Session and Paths Involved

- Request to Lambda to search for available game sessions (Gateway, Lambda)
- GameLift searches through “targeted queue’s destinations for a potential fleet that matches our request criteria”
- If session found, return connection and session information and immediately connect
- Else if no existing session found
- Kick off a “game session placement request” from Lambda., which returns an ID
- Pass ID back to client, use to subscribe on client side to “game session fulfillment” notifications
- Once the GameLift service finds a match (creates a new session or finds an available one that wasn’t before), push fulfillment message onto subscribed SQS queue (SNS —> SQS —> Client).
- Start the game!
Actually setting up the architecture in AWS
- I followed the steps starting at minute 7 in the video. No point in detailing every single step here, but it’s all in the video
- High level summary
- Lambda setup
- API Gateway setup, link it to the lambda on POST request
- GameLift Setup
- Upload realtime server script
- Currently using monolithic single script, but can also zip and upload a node project, like we did with Lambda
Lambda Script Code Overview
- handler
- Two main functions
- Searching for game sessions
- Creating game sessions
- Basic setup series (might not need these actually, the other video seems pretty comprehensive)
- Unity
Ideas
- game where a bunch of people join one room
- Some kind of one-vs-many hide and seek?? Maybe the one has a vision cone where, when they see (quantumly observe/measure) someone, that person teleports somewhere random (would have to tune that randomness carefully to create good gameplay)
- Update on this thought: the architecture we’re using is much better suited to having multiple sessions running. Usually, one would try to fit architecture to game, but since I want to use this architecture for interview prep, let’s try and design the game to be able to have multiple sessions going if possible.
- Explore
- Simple graphics, players can be dots
- Probably even want to go 2D graphics for ease, honestly. Don’t think we can support 3D on this timeline
- Two level system
- “Ground” and “excited” states
- You can “quantum tunnel” between the two layers by finding one time use consumables
Gameplay and Genre
- @Ben Kuchma and I talked about making a multiplayer game. I’m taking a course rn on multiplayer game dev and know AWS so I think we should try this
- Something action-based
- Interesting player movement
- Potentially something with a loose education theme
Themes and Aesthetic
- Probably go for something relatively colorful and eye catching, we want it to be judged favorably