EOS Lobby Integration
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide will show you how to integrate Edgegap to work with EOS lobbies in your Unreal game project. Some steps will require you to send requests to our API using a token, and the curl
commands provided below will allow you to preview each of their response so that you may determine how to manage them in your code. When using the token in your requests, make sure to keep the token
keyword.
You will also need to have an application version already set up on our platform for our project. In this case, we recommend using the Edgegap Unreal plugin to help speed up the testing process. For more information on the plugin, you can read our documentation .
As a safety measure, it is not recommended to have the EOS Lobby Owner send requests directly to the Edgegap API in a production environment, due to the client getting access to the API token. You should instead use a separate service to manage these requests.
To begin with, each player that joins a lobby - including the Lobby Owner - needs to get their public IP and store it as a .
Once the Lobby Owner decides that the match is ready to begin, a request needs to be sent to create a new deployment on Edgegap, using the stored public IPs.
When the players receive the notification that the IP and port values have been assigned, they can compare them against the client cache and then use them to connect to the server to play the match.
Once the match is finished, the Lobby Owner will unset the IP and port values from the EOS Lobby Properties, which will notify everyone else to disconnect gracefully from the server. If the application has the configuration to inject environment variables, they can be used to terminate the deployment from within at this time.
To terminate the deployment from outside the server, a request like the curl
command shown below can be used instead.
If the players remain in the lobby, the Lobby Owner can then repeat the steps starting at requesting a new deployment in order to initiate a rematch with the same people.
Afterwards, the Lobby Owner will need to keep polling the deployment, using the request_id provided in the response of the deployment creation request. Once the reply has the deployment's current_status
set to READY
, the Lobby Owner will need to set the deployment's IP and port values as .