Giter Club home page Giter Club logo

mlapi's Introduction

GitHub Release NuGet Release Github All Releases

Discord Build Status AppVeyor Tests

Licence Website Wiki Api

MLAPI (Mid level API) is a framework that simplifies building networked games in Unity. It offers low level access to core networking while at the same time offering high level abstractions. The MLAPI aims to remove the repetetive tasks and reduces the network code dramatically, no matter how many of the modular features you use.

The MLAPI has features matched by nobody else, any more features are added when requested. The MLAPI is constantly evolving. Read about our features here.

Getting Started

To get started, check the Wiki. This is also where most documentation lies. Follow the quickstart, join our discord and get started today!

Support

For bug reports or feature requests you want to propose, please use the Issue Tracker on GitHub. For general questions, networking advice or to discuss changes before proposing them, please use the Discord server.

Compatibility

The MLAPI is built to work everywhere. It will run in the web, on many Unity versions, .NET runtimes and such.

The requirements for the MLAPI are:

  • Unity >= 2017

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.

Example

Here is a sample MonoBehaviour showing a chat script where everyone can write and read from. This shows the basis of the MLAPI and the abstractions it adds.

public class Chat : NetworkedBehaviour
{
    private NetworkedList<string> ChatMessages = new NetworkedList<string>(new MLAPI.NetworkedVar.NetworkedVarSettings()
    {
        ReadPermission = MLAPI.NetworkedVar.NetworkedVarPermission.Everyone,
        WritePermission = MLAPI.NetworkedVar.NetworkedVarPermission.Everyone,
        SendTickrate = 5
    }, new List<string>());

    private string textField = "";

    private void OnGUI()
    {
        if (IsClient)
        {
            textField = GUILayout.TextField(textField, GUILayout.Width(200));
            
            if (GUILayout.Button("Send") && !string.IsNullOrWhiteSpace(textField))
            {
                ChatMessages.Add(textField);
                textField = "";
            }

            for (int i = ChatMessages.Count - 1; i >= 0; i--)
            {
                GUILayout.Label(ChatMessages[i]);
            }
        }
    }
}

mlapi's People

Contributors

twotenpvp avatar paulpach avatar gabrieltofvesson avatar jaglitegrann avatar pkaminski avatar darvell avatar marcbritton avatar angusmf avatar jdcook avatar simon-winter avatar tristancms avatar mattwalsh-unity avatar andgeno avatar gisforgravity avatar mighty-professional avatar garethpikpok avatar rivfox avatar babaksamimi avatar alxgb avatar damodarsojka avatar ganon-m avatar dzoni94 avatar aleppi avatar xackery avatar matthayter avatar stuw-u avatar taenebron avatar feesh7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.