Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  • Setting Up The Lobby Level
  • 1. Creating The Lobby Level
  • 2. Adding Player Starts
  • Setting Up The Lobby Classes
  • 1. Creating the Lobby Game Mode
  • 2. Creating the Lobby Game State
  • 3. Creating the Lobby Player Controller
  • 4. Creating the Lobby Player State
  • 5. Creating the Lobby Pawn
  • 6. Creating the Lobby HUD
  • 7. Assigning the Lobby Classes to the Game Mode
  • Finishing Touches
  • 1. Setting Players Ready
  • 2. Starting The Match
  • 3. Leaving The Lobby
  1. Usage
  2. Lobby

Lobby Setup

PreviousOverviewNextSet Players Ready

Last updated 9 months ago

This guide will walk you through the steps required to set up a lobby from scratch using the built in Kronos lobby classes.

The that is shipped with the plugin has a fully functioning KronosExampleLobby map. If you do not want to worry about setting up your own lobby, feel free to use the example lobby map found in "/Plugins/Kronos/Examples/Maps/".

Setting Up The Lobby Level

1. Creating The Lobby Level

Let's start by creating the lobby level itself. Go to File -> New Level and select the "Basic" level.

2. Adding Player Starts

Players who join the lobby will spawn on PlayerStart actors. By default the level contains only one player start which won't be enough for all players. So let's add a few more to the level. The minimum amount of player starts needed is based on your game's max player count.

For example a 4 player coop game will need 4 player starts.

Setting Up The Lobby Classes

1. Creating the Lobby Game Mode

Create a new blueprint from the KronosLobbyGameMode class and open it. Inside the Details panel on the right, you will see a "Lobby" section. From here you can configure things such as lobby wait times and the minimum amount of players required to start the game.

Now that we have the game mode, we need to assign it to the level. With your lobby level open, go to Window -> World Settings and set the "GameMode Override" to your lobby game mode.

2. Creating the Lobby Game State

Create a new blueprint from the KronosLobbyGameState class and open it. Here you can configure whether to relocate players when they join. If enabled, players in the lobby will be moved around locally between player starts, so that everyone will see their own character on the same spot in their screens.

The "Local Player Start Tag" defines which player start should be used for the local player. We need to set this tag for one of our PlayerStart actors. To do this, simply select the player start in the level and set its "Player Start Tag" to the same tag as in the game state.

3. Creating the Lobby Player Controller

Create a new blueprint from the KronosLobbyPlayerController class and open it. Here you can configure whether to override the view target or not. If enabled, players will view the lobby from the perspective of a pre-placed Camera actor in the lobby level.

By default, the first available camera will be used as the view target. If you have multiple cameras in your lobby level then you can enabled the "Find Camera By Tag" option and specify which camera should be used via the "Camera Actor Tag". Let's go back to our lobby level and place a Camera actor.

After adding the camera to the level, select it and make sure that the "Auto Activate for Player" option is disabled. I also recommend disabling the "Constrain Aspect Ratio" option to avoid black bars from appearing at different screen resolutions.

If you have the "Find Camera By Tag" option enabled in your lobby player controller, make sure to add your "Camera Actor Tag" to the camera's Actor Tags list.

4. Creating the Lobby Player State

Create a new blueprint from the KronosLobbyPlayerState class. This class is responsible for storing the ready state of the player. We actually do not need to do anything in this class for the lobby to work.

5. Creating the Lobby Pawn

Create a new blueprint from the KronosLobbyPawn class. This will be the player's character. If you open the blueprint you will see that it does not have a character mesh by default. I'm going to go ahead and add a SkeletalMeshComponent to it, and select a basic character asset.

6. Creating the Lobby HUD

Create a new blueprint from the KronosLobbyHUD class. This class doesn't have any options that we can change. Instead we will use this class to add a lobby widget to the screen and change the input mode in the lobby.

7. Assigning the Lobby Classes to the Game Mode

Now that we have created all the lobby classes we need to go back to our lobby game mode and assign the new classes.

Finishing Touches

There's only a few steps left to do that I'm simply going to sum up here.

1. Setting Players Ready

2. Starting The Match

3. Leaving The Lobby

I'm also going to add a KronosNameplateComponent to the pawn. This component renders a widget above the character's head automatically. For the widget class, I'm simply going to use the "WBP_KronosExampleLobbyPlayer" which is part of the shipped with the plugin. It will display the player's name and ready state. Feel free to copy this widget into your project and customize it to your liking.

For the lobby widget I'm simply going to use the "WBP_KronosExampleLobby" which is part of the shipped with the plugin. This widget has the player ready button, and leave lobby buttons set up automatically. Feel free to copy this widget into your project and customize it to your liking.

The "WBP_KronosExampleLobby" widget already has this implemented, but you can find more information in the section of the documentation.

When all players are ready and the match is started, you will need to initiate a server travel to a new map where the match will be played. The section of the documentation explains this in more detail.

The "WBP_KronosExampleLobby" widget already has this implemented, but you can find more information in the section of the documentation.

Example Content
Example Content
Set Players Ready
Starting The Match
Leaving The Lobby
Example Content