Testing & Debugging
Last updated
Last updated
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! In case you just want to start two players in a specific map to test gameplay functionality, feel free to use your preferred options.
I prefer using the New Editor Window (PIE) mode with Run Under One Process option enabled when no matchmaking functionality is needed for the editor test.
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.
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
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:
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 plugin's 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.
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.LeaveMatch
: Leave the current match and return to main menu.
kronos.LeaveParty
: Leave the current party.
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.