Lobbyist comes with an extensive example project (for UE 4.24 and up) that implements a fully featured lobby system, including:
- A server browser from which players can create new lobbies and join existing ones.
- A multiplayer lobby featuring a chat system, character selection, player kicking, ping visualization and more.
- Traveling to the actual game and getting back to the lobby once the game is over. There are two versions of the example project: one completely implemented in Blueprint and another one implemented in C++. Both projects feature the exact same functionality and use UMG widgets for their UIs. They can be easily used as a base for your own lobbies. A standalone demo version of the example project is also available for evaluation purposes.
Running the project
To run the example project simply launch two standalone clients inside the editor. Please refer to the Local Testing section for additional launch options and specific instructions for UE 4.24 and previous engine versions.
The project is set up to launch into the Menu level. After selecting or creating a lobby in the server browser, players can use the lobby to customize their character, chat and start the game.
Starting the game will load the ThirdPersonExampleMap (from the Third Person Template available in UE4). The lobby leader can end the game by pressing ESC. After the game is over, players are moved back to the lobby.
Blueprint project structure
You can find all the Blueprint and UMG widgets inside the Blueprint folder in the content browser.
- BP_GameInstance. Global game state management. Keeps track of the active session and persists character selection information to make sure the correct skin is applied to the player across map changes.
- BP_MenuGameMode. Game mode used in the menu level, spawns the menu player controller.
- BP_MenuPlayerController. Entry point for most menu functionality. Creates the menu widget and manages the UI. Handles callbacks from the UI to create and join sessions and updates the game instance accordingly.
- BP_LobbyHost, BP_LobbyClient, etc. Lobbyist subclasses that handle all the lobby logic.
- BP_GameMode. Game mode used in the menu level, spawns the menu player controller.
- BP_GamePlayerController. Manages the in-game UI.
- UI. UMG widgets for both menu and game.
All the Blueprint logic—including graph, classes, functions, etc.—is commented. Functions and variables have tooltips explaining what they’re used for.