Testing & Debugging

Testing In Editor

You can test all primary features of Kronos directly in the editor with the Null Online Subsystem by running two or more players in Standalone Game mode.

In order to run multiple games properly, make sure to use Standalone Game mode. Another important option is in the "Advanced Settings" under the multiplayer options disable Run Under One Process.

TIP: You only need to do this to test matchmaking and party functionality! If you just want to start two players in a specific map, feel free to use the New Editor Window (PIE) mode and re-enable the Run Under One Process option.

While testing in the editor be wary of network ports hiding each other. For example, if you have two KronosPartyHost beacons listening on the same port then they'll basically hide each others channels and only one of them will work. As a general rule of thumb, only one session of the same type should be hosted on the same PC at the same time.

Using the Null Subsystem

While developing and testing the game inside the editor, you should always use the Null Online Subsystem. This is an IP based Online Subsystem that is meant to be used for testing purposes. You can find the necessary configurations for this Online Subsystem in the Project Configuration section of the documentation.

I usually have both Online Subsystems configured (leaving net drivers as is) and just switch between them before packaging the project. In most cases you don't even have to change anything else in DefaultEngine.ini.

Limitations of the Null Online Subsystem:

  • Session operations are limited to the local network (LAN)

  • Session searches are slow

  • Session settings are only updated locally, meaning remote players won't see the changes if session settings are updated by the host

  • Session invites are not supported

Debugging

One of the best ways to see what's going on behind the scenes is by looking at the logs. I recommend enabling realtime logging for the project.

Go to Edit -> Editor Preferences -> Play and write -LOG in the "Additional Launch Parameters" field. This will tell the engine to open a separate window that displays the contents of the log in real time for each instance of the game (when using the Standalone Game play mode).

The plugin uses a custom log category called LogKronos. The verbosity of this category can be increased to display more information by adding the following option to the project's DefaultEngine.ini file:

[Core.Log]
LogKronos=Verbose
Debugging Packaged Projects

The log window can also be used to debug packaged projects. I recommend using a simple batch script to launch the game with logging enabled. Copy the following code into a .txt file, replace "MyGame" with your project's name, and save the file as Launcher.bat.

@echo off
:: start the game in windowed mode with logging enabled
:: replace "MyGame" with your project's name
start MyGame.exe -ResX=1280 -ResY=720 -WINDOWED -LOG

Alternatively, you can create a shortcut to the game's exe, open its properties and write additional launch params at the end of the "Target" field.

Gameplay Debugger

As of version 1.7.0, you can also use the Gameplay Debugger of Unreal Engine to view real-time matchmaking and sessions information directly on the screen.

The Gameplay Debugger can be activated with the apostrophe (') key by default, or with the EnableGDT console command. The default visibility of the Kronos debug category can be edited in the "Gameplay Debugger" section of the Project Settings.

NOTE: The Gameplay Debugger will not react to any input if the game is in "UI Only Input Mode" (e.g. in the main menu). In that case, you'll have to use the console to open the debugger.

Console Commands

The plugin has some built in console commands that can help with debugging as well. The console can be opened with the tilde (~) key by default.

  • kronos.SetLobbyTimer: Change the current countdown time in the lobby.

  • kronos.LobbyStartMatch: Start the match immediately regardless of lobby state.

  • kronos.DumpMatchmakingState: Dumps current matchmaking state to the console.

  • kronos.DumpMatchmakingSettings: Dumps current matchmaking settings to the console.

  • kronos.DumpPartyState: Dumps current party state to the console.

  • kronos.DumpReservations: Dumps reservations to the console.

Last updated