Search Results for

    Show / Hide Table of Contents

    Standalone Networking

    Note that implementing a custom networking solution is advanced, and for most use cases, utilizing an existing networking framework integration will work perfectly.

    To implement custom networking using KMPE, use the various send methods and KaijuMultiplayerManager.Receive(ref byte[], out ulong, out int, out bool, int) on the KaijuMultiplayerManager component:

    • KaijuMultiplayerManager.SendSelf(byte[], int, int, bool, bool, bool)
    • KaijuMultiplayerManager.SendSelf(IList<byte[]>, int[], int, bool, bool, bool)
    • KaijuMultiplayerManager.SendOwner(byte[], int, int, bool, bool, bool)
    • KaijuMultiplayerManager.SendOwner(IList<byte[]>, int[], int, bool, bool, bool)
    • KaijuMultiplayerManager.Send(UInt64, byte[], int, int, bool, bool, bool)
    • KaijuMultiplayerManager.Send(ulong, IList<byte[]>, int[], int, bool, bool, bool)
    • KaijuMultiplayerManager.Send(byte[], int, int, bool, bool, bool, bool, ulong[], ISet<ulong>)
    • KaijuMultiplayerManager.Send(IList<byte[]>, int[], int, bool, bool, bool, bool, ulong[], ISet<ulong>)

    The above methods have the following properties for reliable and unreliable methods:

    • Reliable messages are guaranteed to arrive exactly once to a user.
    • Reliable messages sent over a channel are guaranteed to arrive in the same order they were sent. However, there is no guarantee for the order across multiple channels.
      • For example if packet A is sent over channel 0, packet B over channel 0, and packet C over channel 1 to the same user in that order, packet A is guaranteed to arrive before packet B as they are both on the same channel, but packet C may arrive before either or both of them as it was sent on a different channel.
    • Unreliable messages have no guarantees: they may arrive out of order, never at all, or potentially the same packet may arrive multiple times.

    Sample

    To access the sample, open the package manager window by going to Window > Package Management > Package Manager. In the In Project tab, click on Kaiju Multiplayer Engine and click the Samples tab. First, import the Common sample followed by the Standalone sample where the scene Kaiju Multiplayer Engine - Standalone.unity can be found. If you ever need to reset your same scene, from the top menu, go to Tools > Kaiju Solutions > Multiplayer Engine > Samples > Standalone to generate the sample scene again.

    Resources

    If you wish to learn more about implementing a custom networking solution, Valve has some great resources, and Gabriel Gambetta has great articles as well.

    Testing

    To test your game's multiplayer functionality locally, check out the testing documentation.

    In This Article
    Back to top © 2025 Kaiju Solutions Inc.