Tips & tricks

Autoconnect

To ensure that clients automatically connect to the server for their session, we use the Sessions API in Unreal Engine.

UE Session can be tagged with the provided UUID {_session} when created, so clients can find it and join it automatically.

This unique identification is mandatory as game masters must be able to host multiple game sessions simultaneously.

When to send requests

It is recommended to send the session end request right when the last gameplay action is performed or when the game timer hits 0. If the game contains an ending cinematic or credits, game masters may choose to skip it without risking to skip the request.

Here is an example of a session ending sequence: * as soon as no more scoring gameplay can occur (final enemy is killed, timer has ended…), send scores * retry every few seconds until successful reply * when the scores request is successful, leave a 2 seconds delay then send the session end request. * retry every few seconds until successful reply when the session end request is successful, wait for the ending scene to finish if necessary, then automatically shut down