/MLAPI

A game networking framework built for the Unity Engine to abstract game networking concepts

Primary LanguageC#MIT LicenseMIT

MLAPI (Mid level API) is a framework that hopefully simplifies building networked games in Unity. It is built on the LLAPI and is similar to the HLAPI in many ways. It does not however integrate into the compiler and it's meant to offer much greater flexibility than the HLAPI while keeping some of it's simplicity. It offers greater performance over the HLAPI.

Documentation

To get started, check the Wiki. This is also where most documentation lies.

There is also a autogenerated Sandcastle API reference.

Requirements

  • Unity 2017 or newer
  • .NET 4.6 or .NET 3.5 with .NET 2.0 non subset Issue

Feature highlights

  • Host support (Client hosts the server)
  • Object and player spawning [Wiki page]
  • Connection approval [Wiki page]
  • Message names
  • Replace the integer QOS with names. When you setup the networking you specify names that are associated with a channel. This makes it easier to manage. You can thus specify that a message should be sent on the "damage" channel which handles all damage related logic and is running on the AllCostDelivery channel.
  • ProtocolVersion to allow making different versions not talk to each other.
  • NetworkedBehaviours does not have to be on the root, it's simply just a class that implements the send methods etc.
  • Custom tickrate
  • Synced network time
  • Supports separate Unity projects crosstalking
  • Passthrough messages [Wiki page]
  • Scene Management [Wiki page]
  • Built in Lag compensation [Wiki page]
  • NetworkTransform replacement [Wiki page]
  • Targeted messages [Wiki page]
  • Port of NetworkedAnimator [Wiki page]
  • Networked NavMeshAgent [Wiki page]
  • Networked Object Pooling [Wiki page]
  • Synced Vars [Wiki page]
  • Targeted Synced Vars [Wiki page]
  • Encryption [Wiki page]
  • Super efficient BitWriter & BitReader [Wiki page]
  • Command & Rpc system like HLAPI to allow for quick transfer from HLAPI to MLAPI [Wiki page]
  • Observer system similar to the HLAPI [Wiki page]
  • Custom UDP transport support [Wiki page]

Example

Example project

The example project has a much lower priority compared to the library itself. If something doesn't exist in the example nor the wiki. Please open an issue on GitHub.

Special thanks

Special thanks to Gabriel Tofvesson for writing the BitWriter, BitReader & ECDH implementation

Issues and missing features

If there are any issues, bugs or features that are missing. Please open an issue on the GitHub issues page