A complete multiplayer game server implementation using Unreal Engine 5 (C++) with AWS GameLift integration for scalable, production-ready game hosting and matchmaking.
Certificate Completion: Unreal Engine 5 Dedicated Servers with AWS and GameLift
- Dedicated Server Implementation - Server-authoritative gameplay preventing client-side cheating
- Client-Server Replication - Property replication and RPCs for multiplayer state synchronization
- Seamless Travel - Smooth transitions between lobby and match maps without disconnecting players
- Player Session Management - AWS GameLift integration for player authentication and session validation
- GameLift Fleet Management - Auto-scaling server instances based on player demand
- Multi-Region Deployment - Server infrastructure across multiple AWS regions (EC2, S3)
- Matchmaking System - Automated game session creation and player session assignment
- Health Monitoring - Automatic health checks and instance replacement for high availability
- Lobby System - Pre-match lobby with real-time player list synchronization using Fast Array Serialization
- Match Flow - Complete match lifecycle (Pre-match → Match → Post-match) with countdown timers
- Player Authentication - JWT-based authentication with AWS Cognito integration
- Stats & Leaderboards - RESTful API integration for persistent player statistics and rankings
- Server-Client RPC Communication - Remote procedure calls for player actions and server responses
- Network Replication - Efficient delta serialization for player info and game state
- Latency Compensation - Client-side prediction with server reconciliation
- Connection Management - Graceful handling of player connections, disconnections, and session cleanup
┌─────────────────────────────────────────────────────────────────┐
│ Client Application │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Portal UI │ │ Lobby UI │ │ Match Gameplay │ │
│ │ (Sign In) │ │ (Players) │ │ (Timer, Stats) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└────────────────────────────┬────────────────────────────────────┘
│
│ HTTP Requests (Auth, Matchmaking)
│ UE5 Replication (Game State)
▼
┌─────────────────────────────────────────────────────────────────┐
│ AWS GameLift │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ GameLift Fleets (Auto-Scaling Server Instances) │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Lobby │ │ Match │ │ Match │ │ │
│ │ │ Server 1 │ │ Server 1 │ │ Server 2 │ ... │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌──────────────────────────────────┐ │
│ │ Matchmaking │ │ Player Session Management │ │
│ │ Queue │ │ (AcceptPlayerSession) │ │
│ └─────────────────┘ └──────────────────────────────────┘ │
└────────────────────────────┬────────────────────────────────────┘
│
│ AWS SDK Calls
▼
┌─────────────────────────────────────────────────────────────────┐
│ Backend Services (AWS) │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ Cognito │ │ API Gateway │ │ Lambda Functions │ │
│ │ (Auth) │ │ (REST APIs) │ │ (Game Stats) │ │
│ └──────────────┘ └──────────────┘ └─────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ DynamoDB (Player Stats & Leaderboard Storage) │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
- Unreal Engine 5 (C++)
- Blueprints (UI and visual scripting)
- UE5 Replication System - Property replication with
DOREPLIFETIMEmacros - Fast Array Serialization - Efficient delta serialization for dynamic arrays
- Server RPC -
Server_Reliablefor client-to-server communication - Client RPC -
Client_Reliablefor server-to-client updates
- GameLift - Dedicated server fleet management, matchmaking, and auto-scaling
- EC2 - Compute instances for game servers
- S3 - Server build storage and versioning
- Cognito - User authentication and JWT token management
- API Gateway - RESTful API endpoints
- Lambda - Serverless functions for game stats processing
- DynamoDB - NoSQL database for player data and leaderboards
- GameLift Server SDK - Integration with AWS GameLift services
- HTTP Module - RESTful API communication
- JSON - Data serialization for API requests/responses
- UMG (Unreal Motion Graphics) - UI system
- Gameplay Tags - Organized API endpoint management
// DS_LobbyGameMode.cpp - Lines 94-138
void ADS_LobbyGameMode::InitGameLift()
{
FServerParameters ServerParameters;
SetServerParameters(ServerParameters); // Parse command-line args
DSGameInstanceSubsystem->InitGameLift(ServerParameters);
}- Parses command-line parameters (
authtoken,hostid,fleetid,websocketurl) - Registers
OnStartGameSession,OnTerminate, andOnHealthCheckcallbacks - Calls
ProcessReady()to notify GameLift the server is ready for players
// DS_LobbyGameMode.cpp - Lines 58-90
void ADS_LobbyGameMode::TryAcceptPlayerSession(...)
{
// Describe player session from GameLift
auto DescribePlayerSessionsOutcome =
Aws::GameLift::Server::DescribePlayerSessions(Request);
// Verify session status is RESERVED
if (PlayerSession.GetStatus() == PlayerSessionStatus::RESERVED)
{
Aws::GameLift::Server::AcceptPlayerSession(PlayerSessionId);
}
}- Validates player sessions with GameLift before allowing login
- Prevents unauthorized connections and session hijacking
// LobbyPlayerInfo.h - Lines 21-35
USTRUCT()
struct FLobbyPlayerInfoArray : public FFastArraySerializer
{
GENERATED_BODY()
TArray<FLobbyPlayerInfo> Players;
bool NetDeltaSerialize(FNetDeltaSerializeInfo& DeltaParams)
{
return FastArrayDeltaSerialize<FLobbyPlayerInfo,
FLobbyPlayerInfoArray>(Players, DeltaParams, *this);
}
void AddPlayer(const FLobbyPlayerInfo& NewPlayerInfo);
void RemovePlayer(const FString& Username);
};- Efficiently replicates only changed elements (delta serialization)
- Minimizes network bandwidth for dynamic player lists
// DSPlayerController.cpp - Lines 44-55
void ADSPlayerController::Server_Ping_Implementation(float TimeOfRequest)
{
Client_Pong(TimeOfRequest); // Echo back to client
}
void ADSPlayerController::Client_Pong_Implementation(float TimeOfRequest)
{
const float RoundTripTime = GetWorld()->GetTimeSeconds() - TimeOfRequest;
SingleTripTime = RoundTripTime * 0.5f; // One-way latency
}- Calculates single-trip network latency for timer synchronization
- Compensates for network delay in countdown timers
// DS_GameModeBase.cpp - Lines 68-78
void ADS_GameModeBase::TrySeamlessTravel(TSoftObjectPtr<UWorld> DestinationMap)
{
const FString MapName = DestinationMap.ToSoftObjectPath().GetAssetName();
if (GIsEditor)
{
UGameplayStatics::OpenLevelBySoftObjectPtr(this, DestinationMap);
}
else
{
GetWorld()->ServerTravel(MapName); // Seamless travel on dedicated server
}
}- Transitions between lobby and match without player disconnections
- Preserves player state and connections across map changes
// GameSessionsManager.cpp - Lines 20-35
void UGameSessionsManager::JoinGameSession()
{
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(APIData->GetAPIEndpoint(
DedicatedServersTags::GameSessionsAPI::FindOrCreateGameSession));
Request->SetVerb(TEXT("POST"));
Request->SetHeader(TEXT("Authorization"), AccessToken); // JWT auth
Request->ProcessRequest();
}- Communicates with AWS API Gateway for matchmaking
- Handles asynchronous HTTP responses with callbacks
// GameStatsManager.cpp - Lines 91-107
void UGameStatsManager::UpdateLeaderboard(const TArray<FString>& WinnerUsernames)
{
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject());
TArray<TSharedPtr<FJsonValue>> PlayerIdJsonArray;
for(const FString& Username : WinnerUsernames)
{
PlayerIdJsonArray.Add(MakeShareable(new FJsonValueString(Username)));
}
JsonObject->SetArrayField(TEXT("playerIds"), PlayerIdJsonArray);
// POST to Lambda function for DynamoDB update
}- Records match results to DynamoDB via Lambda functions
- Updates leaderboard rankings in real-time
Player Opens Game → Sign In UI → Cognito Authentication → JWT Tokens Stored
↓
Access Token (Auth) | Refresh Token (75 min refresh)
Click "Join Game" → API: FindOrCreateGameSession → GameLift Creates/Finds Session
↓
API: CreatePlayerSession → PlayerSessionId + IP:Port
↓
Client Connects to Dedicated Server → PreLogin Validation
↓
GameLift.AcceptPlayerSession() → Player Joins Lobby
Lobby (Wait for Players) → Countdown → Seamless Travel → Match Map
↓
Pre-Match Timer (30s) → Match Timer (5 min) → Post-Match Timer (10s)
↓
Stats Recorded to DynamoDB → Leaderboard Updated → Travel to Lobby
- Server-Authoritative - All timers run on server
- Client Synchronization - Latency compensation using ping/pong RPC
- Dynamic Updates - Countdown broadcasts every 1 second to all clients
- Types: Lobby Countdown, Pre-Match, Match, Post-Match
- Fast Array Replication - Efficient player list synchronization
- Dynamic UI Updates - Automatic player join/leave notifications
- Server Validation - All player additions/removals validated server-side
- GameLift Integration -
AcceptPlayerSessionon PreLogin - Cleanup on Disconnect -
RemovePlayerSessionon Logout - Secure Connections - PlayerSessionId validation prevents unauthorized access
--authtoken=<AUTH_TOKEN> # From AWS GameLift GetComputeAuthToken API
--hostid=<COMPUTE_NAME> # GameLift Anywhere host identifier
--fleetid=<FLEET_ID> # GameLift fleet ID
--websocketurl=<WS_URL> # GameLift service SDK endpoint
--port=<PORT> # Game server port (default: 7777)- GameSessions API:
ListFleets,FindOrCreateGameSession,CreatePlayerSession - Portal API:
SignUp,ConfirmSignUp,SignIn,SignOut - GameStats API:
RecordMatchStats,RetrieveMatchStats,UpdateLeaderboard,RetrieveLeaderboard
Through this project, I gained hands-on experience with:
✅ Dedicated Server Architecture - Building server-authoritative multiplayer games
✅ Cloud Infrastructure - Deploying and managing AWS GameLift fleets
✅ Network Replication - Implementing efficient state synchronization patterns
✅ Matchmaking Systems - Creating automated player session management
✅ RESTful API Integration - Connecting game clients to backend services
✅ Scalability - Designing systems to handle multiple concurrent game sessions
✅ Player Authentication - Securing multiplayer games with JWT tokens
✅ Production DevOps - Health monitoring, auto-scaling, and deployment strategies
- All C++ code follows Unreal Engine coding standards with proper
UPROPERTYandUFUNCTIONspecifiers - Server logic is separated from client logic using
HasAuthority()checks - Network traffic is minimized through delta serialization and efficient RPC usage
- AWS credentials are parsed from command-line arguments (not hardcoded)
- The project demonstrates production-ready patterns for commercial multiplayer games
Certificate Earned: July 2025
Technologies: Unreal Engine 5, C++, AWS (GameLift, EC2, S3, Cognito, Lambda, DynamoDB)