
How to add an Automated and No Code Matchmaking to Any Unreal or Unity Multiplayer Game
We will cover every steps to set up Edgegap's no-code matchmaking which works with both Unity Engine and Unreal Ungine. Edgegap's matchmaking matches players & launch games instantly, the easy way. Edgegap's Matchmaker is fully-managed, infinitely customizable to optimally group players worldwide.
Let’s get started!
Part 1 - Setup
First, register for a free account to Edgegap’s platform, and create a server application for your game.
If you haven’t already, we have video tutorials for both Unreal and Unity, alongside major netcodes like Mirror and Unity’s Netcode for Game Objects. We also have samples to get you started, and detailed documentation.
With an application version uploaded to the platform, head over to the “Matchmaker” page.
Part 2 - Create a Matchmaker
Click on “Create a Matchmaker” and input a name.
Select the example that matches for your game type, such as “Competitive” for a first-person shooter. For today’s video, we’ll use the simple example.
Your latest application version, with details, is already prefilled.
Then, click on “Create & Start” which pushes the matchmaker to our free cluster and makes it accessible. Ignore the caching warning, as its primarily for games with live traffic.
That’s it, the matchmaker is getting started on our platform.
While we wait for the process to complete, let’s explore the configuration.
Each new version uses semantic versioning. As some deployments may result in errors, the “max deployment retry count” configuration resolves this problem retrying your deployment up to that max count.
“Ticker expiration period” and “removal period” ensures that unexpected client crashes or clients who abandoned matchmaking do not make impact your ticket’s queue.
“Profiles” is where your multiplayer’s matchmaking rules are defined. In other words, it is the logic for pairing players together.
Every time a player selects matchmaking in the game, they create a ticket which assigns them in one of these queues with these specific rules.
If two or more tickets matches, or in other words if two or more players are in the same queue, the matchmaker releases them, and they are allowed to play together. They are deployed to the application version set under the “application” section.
The next part are “rules”.
For example, you might allow players to select specific maps and if you have enough players, the matchmaker send a request to deploy a game server, which allows players to join and play together.
Each rule has three fields to input:
First, a name of your choosing, such as “match size”,
Second, a rule type which is known also as the operator, such as “player count”,
Third is the operator’s attributes, such as “target”. Here, we’d want 2 players in that match.
Each profile is a variable can include different attributes to group players, such as skill levels, location or game mode. This means each profile results in an entirely separate queue within your game.
In this example, we also use a latency-based rule. It is a unique feature of Edgegap’s matchmaker, which serves to ensure the lowest possible ping for all players in a match.
Our matchmaker is now ready! Let’s take a look and then test it by issuing tickets.
Part 3 - Matchmaker Details (Configurations & Rules)
Once your matchmaker has been initialized, you can review the details of the instance.
“Status” indicates the service’s health.
“Identifier” highlights your matchmaker’s unique identifier which helps Edgegap troubleshoot quickly if you need support.
“API URL” is used for all request from the game clients to deploy to the game server.
“Swagger URL” is an handy graphical web interface for open API specification where you can export inspect and test the API schema.
“Authentication Token” is required for all requests made by game clients and game servers for authentication.
Of note is that you can regenerate the auth token. Which is especially recommended in the case you suspect a security breach.
Part 4 - Matchmaker Testing
Now, to test your API, we’re going to first copy the “Auth Token” and then navigate to the swagger URL by clicking on the “link out” icon.
Once the Swagger platform loads, select “Authorize” and paste the “Auth Token” in the value field from earlier. Then click on “Authorize” and close the menu.
As to confirm this worked, scroll down to “Ticket” API section and select “Create a Matchmaking Ticket” field. Click “Try it out”.
First, review the example. Note here “Player IP” is set to null, which means it will use your machine’s IP. Also note the profile being used is the “simple example” created earlier. The latency optimization rules were assigned automaitically dummy values.
To simulate a player’s ticket requesting matchmaking, click on “execute”. This creates a ticket, which allows us to evaluate the response.
Scroll down to the “Response Body” which allows us to see the Ticket’s ID. Make sure to copy this string to review the ticket in a few seconds.
Additionally, you can note that the assignment is “null” as the ticket has just been issues, and it’s missing a second player per the rules we set before deploying a game server.
As such, we’re scroll back up to create a second ticket by clicking “execute”. This simulates a second player for the matchmaker to group with the first.
Once complete, we’ll scroll back to the top and open fetch the Ticket to review our test. Paste the original Ticket ID and select “execute”.
Returning to the response body, we see that the status has now changed to “Match Found” which means the two tickets were found matched.
After refreshing, the status will change to “Host Assigned” which means the server was deployed automatically.
Under “assignment”, we see a host has been assigned, it also lists an available URL and highlights the public IP of the server, alongside the external and internal ports used for the game clients.
Returning to the Edgegap platform, we can see the deployment’s details are tagged with the ticket IDs. We conveniently can see the same URL and the ports mapping. We can also see that the server is ready through the green checkmark icon.
Open the server in the browser and you’ll see that you’ve connected the players. Congratulations, you matchmaker is now functional.
[Chapter 5 – Matchmaker Next Steps]
The simple example may be enough for your needs.
For games with multiple game modes or game developers that want to explore rule expansion to optimize their matchmaker for shorter queue times, we recommend exploring our documentation.
Make sure to subscribe to our channel as we’ll add new tutorial videos.
You can also join our Community Discord to ask our dev team and other studios for input on how to best optimize your matchmaker.
Thanks for watching!
