Giter Site home page Giter Site logo

paulauguste-voodoo / multiplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity-technologies/multiplayer

0.0 0.0 0.0 418 KB

Unity multiplayer packages and samples

License: Other

C 5.51% C# 91.72% Makefile 1.15% Batchfile 0.68% C++ 0.58% HTML 0.37%

multiplayer's Introduction

Welcome

Welcome to the Unity Real-time Multiplayer Alpha repository!

Here you can find all the resources you need to start prototyping your own real-time multiplayer games.

Manual - Table Of Contents

Click here to visit the forum

Included content

  • com.unity.transport/ - source of the Unity Transport package.
  • network.bindings/ - source of the native network bindings for the Unity Transport.
  • sampleproject/ - Unity Project containing all the Unity.Networking.Transport samples.
  • sampleproject/Assets/Matchmaking - source of Unity Matchmaking.
  • sampleproject/Assets/ServerQueryProtocol - source of Unity Server Query Protocol.

Unity Transport Package

The new Unity Transport Package which will replace the UNet low-level API is available in com.unity.transport/ . This preview of the transport package support establishing connections and sending unreliable messages to a remote host. It also contains utilities for serializing data streams to send over the network. The native bindings for the transport package are available in network.bindings/ . You normally do not need to build the bindings yourself, but if you do instructions are included in the installation guide. For more information about the transport package, please see the Unity Transport Documentation

Matchmaking

The Unity matchmaking library is available in sampleproject/Assets/Matchmaking/ . This library will allow you to use the matchmaking service to find a server to connect to.

Server Query Protocol

In order to host a server runtime on Unitys Multiplay service the runtime needs to follow the Server Query Protocol so the infrastructure can gather information about the running process. The code required to support the Server Query Protocol is available in samplesproject/Assets/ServerQueryProtocol/ .

Samples

Ping

The ping sample is a good starting point for learning about all the parts included in this package. The ping client establishes a connection to the ping server, sends a ping message and receives a pong reply. Once pong is received the client will disconnect. It is a simple example showing you how to use the new Unity Transport Package, and it can also be deployed to Multiplay where it responds to the Server Query Protocol and you can find it using our Matchmaker. Ping consists of multiple scenes, all found in sampleproject/Assets/Scenes/ .

  • PingMainThread.unity - A main-thread only implementation of ping.
  • Ping.unity - A fully jobified version of the ping client and server.
  • PingClient.unity - The same jobified client code as Ping.unity, but without the server.
  • PingServer.unity - The dedicated server version of the jobified ping. A headless (or Server Build in 2018.3) Linux 64 bit build of this scene is what should be deployed to Multiplay.
  • PingECS.unity - An ECS version of the jobified ping sample.

Soaker

A stress test which will create a set number of clients and a server in the same process. Each client will send messages at the specified rate with the specified size and measure statistics.

Installation

To try out samples in this repository all you need to do is open sampleprojects/ in Unity. If you wish to create a new Unity project using these packages that is also possible.

  • Make sure you have a supported version of Unity (2018.2 or newer)
  • Create a new Unity project
  • Once the project is created then navigate in the Editor menu to: Edit > Project Settings > Player > Other Settings then set Scripting Runtime Version to: 4.x equivalent. This will cause Unity to restart.
  • Copy com.unity.transport/ from this repository to <YourNewUnityProject>/Packages/
  • Copy sampleproject/Assets/Matchmaking/ to somewhere inside your Assets/ folder if you want to use matchmaking
  • Copy sampleproject/Assets/ServerQueryProtocol/ to somewhere inside your Assets/ folder if you want to add support for the Server Query Protocol

Building network.bindings

Public releases of this package contains pre-built binaries, but it is also possible to build them yourself if you need to modify the bindings. Source directory can be found under network.bindings/

Windows

  • calling build.bat will build the native.bindings project and copy the network.binding.dll + pdb and network.bindings.cs the native interface for c#

Linux / MacOS / iOS

  • calling make will build the network.bindings library
  • calling make install will install the network.bindings library into your com.unity.transport package. On iOS it will copy the bindings source files to the bindings folder instead, and they'll be used directly in the generated XCode project.

Android

  • only pre-built binaries are included for now.

multiplayer's People

Contributors

michalbrzozowski avatar timj-unity avatar asyasmi avatar larus 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.