Discover how Edgegap works

Discover how Edgegap works

/

/

Top Down Template

Unreal Engine

Top Down Template

Deploy to Edgegap

Published

Published

Published

Last reviewed for accuracy

Last reviewed for accuracy

Last reviewed for accuracy

Top Down Template: Run Epic's Unreal Top Down template on Edgegap dedicated servers, with Matchmaking

Top Down Template: Run Epic's Unreal Top Down template on Edgegap dedicated servers, with Matchmaking

The Top Down template is one of Unreal Engine 5's starter projects: click to move your character around a small level. Edgegap's sample turns it into a multiplayer game where every match runs on its own dedicated game server.

Matchmaking and voice chat are both off by default: until you turn them on, the sample plays like Unreal's template, and players join a server with open <IP:port>. Unreal's own replication does the networking, as in any Unreal multiplayer game.

Turn on the Edgegap matchmaker and players get a Find Match button: the game measures their ping, groups them with nearby players, and connects them to a server started for their match. Turn on EOS voice chat and players can talk in voice rooms the game server controls: the server decides who shares a room, so a player can’t join a channel it wasn’t given.

Edgegap's network spans 615+ Edge Cloud locations (learn more). Each server is deployed to the best available location for its players, stops itself when the match is empty, and is billed only while it runs.

Platforms: Windows game clients (voice also builds for Mac, not tested) and a Linux dedicated server on Edgegap. Last tested with Unreal Engine 5.5.4 built from source; other Edgegap Unreal samples are confirmed on 5.8. Based on Epic’s Top Down template. Edgegap’s code is under the MIT licence; the Unreal Engine content it builds on stays under Epic’s terms.

How it works

  1. A player selects Find Match on the menu map. The game pings Edgegap's beacons and sends a matchmaking ticket with those ping times.

  2. The matchmaker groups 2 to 4 players with a similar ping to the same beacon, then starts an Edgegap deployment near them.

  3. Each client gets the server's address and port, and connects with Unreal's ClientTravel.

  4. With voice on, each player logs into EOS with a device ID and sends the server an ID token. The server checks it, picks the player's room from the matchmaker's team data, and sends back a voice token for that room only.

  5. When the last player leaves, the server waits 15 seconds, then stops its own deployment, which ends billing.

What the sample adds to the template:

Path

What it does

MultiplayerGame/Source/MultiplayerGame/EdgegapMatchmakerSubsystem.h/.cpp

Client: beacon pings, matchmaking ticket, waits for a server, connects.

MultiplayerGame/Source/MultiplayerGame/MultiplayerGamePlayerController.cpp

Find Match / Cancel overlay on the menu map; FindMatch and CancelMatch console commands.

MultiplayerGame/Source/MultiplayerGame/MultiplayerGameGameMode.cpp

Server: stops the deployment when a matchmaker-started match is empty.

MultiplayerGame/Source/MultiplayerGame/EdgegapVoice*

EOS voice: settings, client login and rooms, the replicated voice component, the server's token service.

MultiplayerGame/Source/MultiplayerGameServer.Target.cs

The dedicated server build target.

Dockerfile, matchmaker-config.json

The server image and the matchmaker profile.

No credit card required. Free tier includes the resources to deploy a real game server.

No credit card required. Free tier includes the resources to deploy a real game server.

Unreal Engine Top Down template seen from above: a player in an arena of blue shapes, with the Unreal Engine logo.

Epic's Top Down template with a dedicated server, optional matchmaking and EOS voice chat.

Step-by-Step Guide

Run the Sample

1. Before you start

  • A free Edgegap account. No credit card is needed to test.

  • Unreal Engine 5.5 built from source, with Visual Studio 2022 and the Linux cross-compile toolchain for 5.5. The sample packages its Linux server with RunUAT, which needs a source build. Plan 1 to 3 hours for the first engine build, and about an hour for the first server package. The Unreal Engine guide covers the setup, and a faster path with Edgegap's Docker Extension (not tested with this sample yet).

  • Docker Desktop, to build the server image.

  • For voice chat only: a product in the Epic Developer Portal.

  • Clone the sample. The Unreal project is in the MultiplayerGame folder.

2. Put the game server on Edgegap

Package the Linux dedicated server into Packaged/ at the repository root:

<UE_ROOT>/Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project=<PATH>/MultiplayerGame/MultiplayerGame.uproject -noP4 -server -noclient -serverplatform=Linux -serverconfig=Development -build -cook -stage -pak -archive -archivedirectory=<PATH>/Packaged

Log Docker into your Edgegap registry with the username and token from the Container Registry page. Then build and push the image from the repository root, with a new tag for every build:

docker build --platform linux/amd64 -t registry.edgegap.com/<project>/unreal-topdown:v1 .

docker push registry.edgegap.com/<project>/unreal-topdown:v1

In the dashboard, create an application (the matchmaker profile expects unreal-topdown) and a version v1:

  • Your image and tag, with your registry credentials. Without them, deployments fail with "Unable to pull image from registry".

  • One port: name gameport, 7777, UDP.

The Dockerfile runs the server binary directly, with -stdout -FullStdOutLogOutput, so its logs show in the dashboard and it stops cleanly when Edgegap ends the deployment.

3. Play on a test server

Open your app version in the dashboard, select Deploy and pick a location near you. When it's Ready, copy the Host and External Port.

Run the game, open the console with the ` key and type:

open <host>:<external port>

The external port changes on every deployment. Run a second client the same way and both players walk around the same level.

A server you deploy by hand never stops itself: stop it from the dashboard when you're done. The free tier runs one deployment at a time, so a forgotten test server blocks matchmaking.

4. Add EOS voice chat (optional)

The game server acts as EOS Voice's trusted server. It calls the EOS Voice Web API over HTTPS, because the EOS SDK doesn't support voice on Linux. Players log in with a device ID, so they need no Epic account.

  1. In the Epic Developer Portal, open your product, then Product Settings. Note the Product ID, Sandbox ID and Deployment ID. On the Clients tab, add two client policies, and one client for each:

  2. Game client: type GameClient, User required checked, no Voice permission.

  3. Trusted server: a custom policy, User required unchecked, with the Voice actions createRoomToken, kick and mute. This client can create a token for any room: never put it in a game build.

  4. Put the product, sandbox and deployment IDs and the game client's ID and secret in an [EOSVoiceChat] section of MultiplayerGame/Config/UserEngine.ini. Git ignores it.

  5. Turn voice on in MultiplayerGame/Config/UserGame.ini: bEnabled=True under [/Script/MultiplayerGame.EdgegapVoiceSettings].

  6. On a new app version, add the environment variables EOS_VOICE_CLIENT_ID and EOS_VOICE_CLIENT_SECRET (mark it hidden) with the trusted server's credentials, and EOS_VOICE_DEPLOYMENT_ID. Voice turns on in the server when they're set, with no image rebuild.

  7. Package the client again and play. Type VoiceMute in the console to mute or unmute your microphone.

On a server deployed by hand, the whole match shares one room. With the matchmaker (step 6), teammates share a room.

To test two clients on one PC, add -EOSVoiceNewDeviceId to the second client, and start it only after the first logs Voice: logged into EOS. To check audio without a microphone, start a client with:

-ExecCmds="EOSVoiceChat.FakeAudioInputEnabled 1"

The other client then logs Voice: <id> started talking in room <room>.

5. Add it to your own Unreal game

The sample is a working reference: your coding agent can copy its tested files instead of writing them from scratch. These changes make an Unreal game run on Edgegap:

  1. A dedicated server build. A Server target (Source/MultiplayerGameServer.Target.cs), a server default map (ServerMap in Config/DefaultEngine.ini) and that map in the maps to cook (Config/DefaultGame.ini).

  2. Find Match on the client. EdgegapMatchmakerSubsystem pings the beacons, creates the ticket, waits for a server and connects. Its settings are in the [/Script/MultiplayerGame.EdgegapMatchmakerSubsystem] section of DefaultGame.ini.

  3. Servers that stop themselves. When the matchmaker started the server, it stops its deployment once the match is empty (MultiplayerGameGameMode.cpp).

  4. Voice rooms decided by the server. The four EdgegapVoice* classes, the EOS modules in MultiplayerGame.Build.cs for Windows and Mac clients only, and the EOSVoiceChat plugin in the .uproject, limited to Win64 and Mac so the Linux server doesn't load the EOS SDK.

  5. A server image. The Dockerfile copies Packaged/LinuxServer into a small Ubuntu image that runs as a non-root user.

In the sample, the Find Match overlay and the self-stop sit in the player controller and the game mode. In your own game, you don't need to edit either: the Edgegap agent skills ship the same logic as drop-in subsystems.

With your agent:

"Load the edgegap-unreal skill, then edgegap-eos-voice. Using github.com/edgegap/game-sample-unreal-engine-topdown as the reference, make my Unreal project dedicated-server ready, add Edgegap matchmaking with a Find Match button and server self-stop, and add EOS voice chat with one room per matchmaker team. Keep matchmaking and voice disabled until I give you my matchmaker URL and EOS IDs, and check that the editor and Server targets compile."

For each step in detail, by hand, see the Unreal Engine integration guide.

6. Turn on Find Match

  1. In the dashboard, open Matchmaker and select Create Matchmaker. Upload the sample's matchmaker-config.json, with application.name and application.version changed to your app and version, then Create and Start.

  2. When it's ONLINE, copy its API URL and Auth Token.

  3. In MultiplayerGame/Config/UserGame.ini, add the [/Script/MultiplayerGame.EdgegapMatchmakerSubsystem] section with bEnabled=True, MatchmakerUrl="<API URL>" and AuthToken="<Auth Token>". Keep the URL in quotes: unquoted, Unreal cuts it at //.

  4. Launch two clients and select Find Match in both within 10 seconds. They join the same server.

The casual profile matches 2 to 4 players whose ping to a common beacon is under 150 ms and within 100 ms of each other. After 10 seconds, it also accepts a single player and pings up to 250 ms, so you can test alone. A ticket with no match is cancelled after 20 seconds: select Find Match again.

The Auth Token only lets clients create and read tickets, so it's safe to ship in the game. Never put your Edgegap API token in the game.

For unattended tests, -FindMatch on the command line queues at startup. Clients start at different speeds, so with voice tests launch both with the same -FindMatchAt=<unix time> instead: each queues at that moment.

When you ship a new server build, point application.version at the new version, or matches keep deploying the old build. For matchmaking in your own game, see Unreal Matchmaking.

Known limits

  • Engine built from source. The sample's packaging steps need a source build of Unreal 5.5. Edgegap's Docker Extension builds Unreal servers from a Launcher install; it should work with this sample, but it's not tested yet.

  • Voice runs on Windows and Mac clients. The engine's EOSVoiceChat plugin has no Linux client. Mac builds should work, not tested.

  • One team per match. The casual profile has one team, so every matched player shares a voice room. For two teams, add team_count: 2 to the profile: the server then gives each team its own room (written but not tested). The server finds a player's team from their IP, so players behind the same IP stay in the match room.

  • Device ID logins. Players get an EOS identity tied to their PC, with no platform account. For a shipped game, use the platform's login (Steam, consoles) and link accounts.

  • A basic menu. The Find Match overlay is a simple Slate widget. For your own menu, call FindMatch and listen to the subsystem's status from UMG.

  • No ticket check on the server. The server doesn’t check that a connecting player holds a matchmaker ticket for this match, so anyone who learns the server address can join, and with voice on, get a voice token for its room.

What was tested

Tested end to end on Edgegap in October 2026 (matchmaker test passed on 14 October), with Unreal Engine 5.5.4 built from source, Windows clients and the Linux server on Edgegap:

  • Matchmaking: two clients matched by latency onto one Edgegap deployment; the server stopped its own deployment after both left.

  • Voice, local: two clients on one PC (-EOSVoiceNewDeviceId, fake audio input) against a local dedicated server: both joined the room with different EOS identities.

  • Voice, on Edgegap: two clients matched onto one deployment, in the same team room, hearing each other. When one quit, the server removed it from the room (204).

Log lines to look for (LogEdgegapVoice): on the server, Voice: trusted voice server ready, then Voice: <id> gets room <room> for each player, and Voice: removed <id> when a player leaves. On each client, Voice: logged into EOS as <id> and Voice: joined room <room>.

Not tested yet: matches of 3 or 4 players, two teams in separate rooms, Mac clients, and building the sample with the Docker Extension.

Frequently Asked Questions

Questions about running Unreal's Top Down template with Edgegap matchmaking and EOS voice chat.

Can Unreal's Top Down template run on a dedicated server?

Yes. Edgegap's sample adds a Server target and a server map to the Top Down template, and packages it as a Linux dedicated server. Players join with open <IP:port>, or with a Find Match button once the Edgegap matchmaker is on.

Does EOS voice chat work with a Linux dedicated server?

Not through the EOS SDK, which doesn't support voice on Linux. The sample's server uses the EOS Voice Web API instead: it checks each player's EOS ID token and hands out voice room tokens, while the Windows or Mac clients join the rooms.

Do players need an Epic Games account for EOS voice chat?

No. The sample logs players into EOS with a device ID, so there's nothing to sign up for. For a shipped game, you can replace it with your platform's login, such as Steam.

Can each team have its own voice channel?

Yes. With team rooms on, the server puts each matchmaker team in its own room, so players can't hear the other team. The sample's matchmaker profile has one team per match, so everyone shares a room until you add a second team.

Clients

Learn more from clients who integrated Edgegap

31 case studies are available from studios that moved to Edgegap from another platform.

Key reasons why they chose Edgegap

Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.

Cost

Pricing

Pricing

Optimize costs and performance with hybrid orchestration

Optimize costs and performance with hybrid orchestration

Optimize costs and performance with hybrid orchestration

Edge Cloud

On-Demand

$0.00115

/ vCPU

/ MINUTE

Billed by the Minute, Only on Usage

Pay only when players play. 0 active servers = $0

Deploy game servers worldwide, per instance, to all 615+ edge cloud locations. Zero commitment.

Simply add a credit card.

Edge Cloud

On-Demand

$0.00115

/ vCPU

/ MINUTE

Billed by the Minute, Only on Usage

Pay only when players play. 0 active servers = $0

Deploy game servers worldwide, per instance, to all 615+ edge cloud locations. Zero commitment.

Simply add a credit card.

Edge Cloud

On-Demand

$0.00115

/ vCPU

/ MINUTE

Billed by the Minute, Only on Usage

Pay only when players play. 0 active servers = $0

Deploy game servers worldwide, per instance, to all 615+ edge cloud locations. Zero commitment.

Simply add a credit card.

Private Fleet (Bare Metal)

Reserved Capacity

$0.0261

/ vCPU

/ HOUR

Billed Monthly, Always On

$280 per host/month (12 mo rate), or $350 monthly

Optimize the cost effectiveness of your game server with egress-free hosting of Private Fleets.

Persistent, available 24/7, exclusive to your studio.

Private Fleet (Bare Metal)

Reserved Capacity

$0.0261

/ vCPU

/ HOUR

Billed Monthly, Always On

$280 per host/month (12 mo rate), or $350 monthly

Optimize the cost effectiveness of your game server with egress-free hosting of Private Fleets.

Persistent, available 24/7, exclusive to your studio.

Private Fleet (Bare Metal)

Reserved Capacity

$0.0261

/ vCPU

/ HOUR

Billed Monthly, Always On

$280 per host/month (12 mo rate), or $350 monthly

Optimize the cost effectiveness of your game server with egress-free hosting of Private Fleets.

Persistent, available 24/7, exclusive to your studio.

Your bill varies per rate and usage; which can vary per game type, player count, & more.

Your bill varies per rate and usage; which can vary per game type, player count, & more.

Model your usage with our estimate calculator ->

Model your usage with our estimate calculator ->

Edgegap's features & price: detailed comparison between Edge Cloud & Private Fleets

Edgegap's features & price: detailed comparison between Edge Cloud & Private Fleets

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.

COMPARE

Free Trial

Edge Cloud

Private Fleets

FEATURES

Analytics & Monitoring

Billing Alarms

Click to Expand

28 more rows

Unlocks

Capabilities are unlocked when a credit card is added to the account.