Unreal Multiplayer Menu

A menu system for both hosting and joining multiplayer game using LAN or Steam.

Implemented using: Unreal Engine, C++, Steam SDK

This demonstrates using Unreal’s UMG UI system as well as the online subsystem implementation. The code is 99% C++ with the UI layout done in the UserWidget blueprint system.

The hosting functionality uses the Unreal’s Session pattern and allows the user to set a friendly name for the server when listing it in the join menu.

The joining functionality makes a find session request of the appropriate network type. When the system returns a result (async process) any servers being currently hosted will be listed. The user then selects the server they want to join.

Once a game is hosted or joined, the user is in the lobby (currently just a blank level with each player character in it). The current setup launches the game when 3 or more users join and 10 seconds has elapsed.

In the future I will implement UI for the lobby to set game options for the host, and a ready to start for the clients. A chat system would be interesting as well.

The classes of note are PuzzlePlatformsGameInstance.cpp, and MainMenu.cpp.

Source Code

Try it out!