Getting Started
Kaiju Multiplayer Engine, abbreviated as KMPE throughout this documentation, can be purchased from the Unity Asset Store. As an Extension Asset of the Standard Unity Asset Store EULA License, one license is required per user.
Currently, KMPE requires Unity 6.3. We aim to support the latest LTS and if any exist, supported Unity releases beyond the latest LTS version. As Steam only supports Windows, Mac, and Linux, KMPE only works on these platforms. While KMPE won't function on other platforms, it has been designed to not throw errors on these platforms, meaning you can safely keep KMPE in your project for cross-platform games.
Before downloading KMPE, it is recommended you install Git as many integrations need Git for an easy installation. If you choose not to install Git, you can still use KMPE but will need to manually install tools such as Steamworks.NET. For more, see the Unity documentation on Git packages.
From the asset store page, click "Open in Unity". If already in Unity, open the package manager window by going to Window > Package Management > Package Manager from the top menu, click on My Assets, and search for Kaiju Multiplayer Engine. Click the Import button. If the Import button does not appear, first click the Download button and once finished you can import KMPE.
If Steamworks.NET, the core dependency of KMPE, is already installed, you are ready to move on to the next steps! Otherwise, the setup wizard will open to guide you through the rest of the setup.
Setup Wizard
The setup wizard will allow you to easily install dependencies and networking library integrations. At a minimum, Steamworks.NET must be installed, and it is recommended to install either Multiplayer Play Mode or ParrelSync to simulate local multiplayer.
Additionally, you can click to install your choice of networking library.
You can open the wizard at any time by going to Windows > Kaiju Solutions > Multiplayer Engine > Wizard or Tools > Kaiju Solutions > Multiplayer Engine > Windows > Wizard from the top menu.
Dependencies and Integrations
You can manage dependencies and integrations outside of the setup wizard by going to Tools > Kaiju Solutions > Multiplayer Engine > Dependencies and Tools > Kaiju Solutions > Multiplayer Engine > Integrations from the top menu.
Preprocessor Directives
KMPE uses preprocessor directives to enable and disable functionality based on what dependencies and integrations are installed. These are automatically added when installing a given dependency. Additionally, if you uninstall the dependency from the top menu with Tools > Kaiju Solutions > Multiplayer Engine > Dependencies > Uninstall, the directives will be automatically removed. However, if you remove any dependencies manually, such as through the package manager, the preprocessor directives will not be removed automatically, which will cause compilation errors. If this happens, you will need to manually remove the preprocessor directives associated with the dependency or integration you removed by going to Edit > Project Settings from the top menu, selecting Player, and scrolling down to Scripting Define Symbols. Below are the preprocessor directives which KMPE uses:
STEAMWORKS_NET- For when Steamworks.NET is installed.MULTIPLAYER_PLAY_MODE- For when Multiplayer Play Mode is installed.PARREL_SYNC- For when ParrelSync is installed.NETCODE_FOR_GAMEOBJECTS- For when Netcode for GameObjects is installed.FISHNET- For when FishNet is installed.PURRNET- For when PurrNet is installed.DISABLE_KAIJU_VOICE- Set this flag to disable KMPE's voice chat system. Set this if you are using a third-party system to handle your voice chat.USE_STEAM- This is not defined in the preprocessor directives in the project settings, but is instead defined within scripts when Steamworks.NET is installed and the project is on a desktop platform to enable KMPE functionality. Do not manually define this in your preprocessor directives.
Next Steps
While not required, you will likely want to install either Multiplayer Play Mode or ParrelSync to simulate local multiplayer. For more on this, see the testing page. See either the setup wizard or dependency management sections for how to install these tools.
To get up and running, simply add the KaijuMultiplayerManager component to the scene. If not already present, this will add the required steam_appid.txt, which is required by Steamworks.NET, to the root of the project, and sync the ID. The KaijuMultiplayerManager is a singleton, meaning only one instance ever exists across all scenes. You can safely add a KaijuMultiplayerManager into all scenes and it will automatically ensure only one exists at runtime. Most KMPE functionality is accessed through the KaijuMultiplayerManager in a static manner.
To create a Steam game, you will need to obtain a Steamworks application ID. To obtain one, you will need to sign into Steamworks and sign up as a developer. While developing, it is common to use the application ID of 480 as a placeholder before obtaining your own. The application ID of 480 is a development ID provided by Steam. While using the application ID of 480, you will appear as playing "Spacewar" on Steam, and certain Steamworks features which require configuration on the Steamworks backend will not function. However, the application ID of 480 is fully capable of testing the core matchmaking and networking features provided with KMPE.
Next, learn how to create and find matches, how to implement networking between players including what frameworks are supported, and how to get player information.