Unreal Multiplayer
Last updated
Last updated
This guide explains how to get started with multiplayer in Unreal using Heathen's Toolkit for Steamworks. Unreal's networking is built into the engine, and our Toolkit streamlines the integration of matchmaking and lobby functionality without relying on outdated session systems.
Native Integration: Unreal Engine incorporates robust networking features as a core part of its architecture. This means much of the multiplayer logic is inherent to the engine.
Toolkit Advantages: Heathen's Toolkit for Steamworks allows you to work directly with Steam matchmaking and related tools. This integration eliminates the need for third-party session systems for most projects.
Sessions & Advanced Sessions: Although Unreal supports Sessions and Advanced Sessions, we do not recommend using them. They make assumptions that can conflict with Steam Lobby functionalities and do not fully leverage the benefits of Steam’s matchmaking tools.
Direct Connection Method: Instead of sessions, you can use Unreal’s built-in Open Level node for connecting to a session. Simply use the "address" parameter as the level name to connect to the desired server.
Using Open Level:
Process: To connect to a session, call the Open Level node in your Blueprint and provide the target level name as the “address.” This method replaces the traditional session connection workflow.
Toolkit Integration: Heathen's Toolkit for Steamworks handles the background work of connecting via Steam’s networking. For detailed connection flows, refer to our separate article on Steam Lobby.
Connect to ID: How you know the ID to connect to depends on the "discovery" method you choose for your game. Steamworks has quite a few tools that can help here
Listen Server Setup:
Procedure:
For hosting a multiplayer game as a Listen Server, use the Open Level node. In the level options, append ?listen
to the level name. This instructs Unreal to launch the level in listen server mode.
Underlying Mechanics:
The addition of ?listen
ensures that your game instance acts as both a client and a server, enabling others to join your session.
Connecting via IDs:
Direct Connection: In Steam, you connect directly to a User or Server ID, not to a Lobby. This is crucial as it differs from Unreal's concept of session-based networking.
Steam Lobby Role: For matchmaking, groups, etc., Steam Lobby is a separate tool. It helps players find each other and set up sessions, but it is not used for the actual network connection.
Recommendation: We encourage you to review our dedicated article on Steam Lobby to fully understand its role and limitations.
Unreal’s Strength: Unreal's networking is integrated, making it simpler to develop multiplayer experiences without relying on external session systems.
Toolkit Benefits: Heathen's Toolkit for Steamworks simplifies matchmaking and lobby management, bypassing the need for Sessions or Advanced Sessions.
Direct Methods:
Connecting: Use the Open Level node with the level name as the address.
Hosting: Append ?listen
to start a listening server.
Steam Connection Essentials: Always connect using a User or Server ID. Avoid using a Lobby for networking, and consult our Steam Lobby article for further clarification.
(see tools to convert User IDs to and from Hex)