GithubHelp home page GithubHelp logo

yazici / multiplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity-technologies/multiplayer

0.0 0.0 0.0 2.01 MB

Unity multiplayer packages and samples

License: Other

C# 99.12% ShaderLab 0.88%

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.

NetCode Manual - Table Of Contents

Transport Manual - Table Of Contents

Click here to visit the forum

Included content

  • sampleproject/ - Unity Project containing all the multiplayer samples.
  • sampleproject/Assets/Samples/Asteroids - Asteroids clone demonstrating the core netcode concepts.
  • sampleproject/Assets/Samples/NetCube - Sample showing basic netcode usage.
  • sampleproject/Assets/Samples/Ping - Sample showing basic transport usage.
  • sampleproject/Assets/Samples/Soaker - A soak tester for the transport, for testing typical production load.

Unity Transport Package

The new Unity Transport Package which will replace the UNet low-level API. The preview of the transport package supports establishing connections and sending messages to a remote host. It also contains utilities for serializing data streams to send over the network. For more information about the transport package, please see the Unity Transport Documentation

Unity NetCode Package

The netcode package provides the multiplayer features needed to implement world synchronization in a multiplayer game. It uses the transport package for the socket level functionality and is made for the Entity Component System. Some higher level things it provides are

  • Server authoritative synchronization model.
  • RPC support, useful for control flow or network events.
  • Client / server world bootrapping so you have clear seperation of logic and you can run a server with multiple clients in a single process, like the editor when testing.
  • Synchronize entities with interpolation and client side prediction working by default.
  • Network traffic debugging tools
  • GameObject conversion flow support, so you can use a hybrid model to add multiplayer to a GameObject/MonoBehaviour based project.

For more information about the netcode package, please see the Unity NetCode Documentation

Samples

Ping

The ping sample is a good starting point for learning about all the parts included in the transport 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. 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 2019.1) 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.

Asteroids

A small game featuring the Unity NetCode Package features.

NetCube

A small sample featuring the Unity NetCode Package features. This is the code used in the Unite presentation about NetCode

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 (2019.3 or newer)
  • Create a new Unity project
  • If you want to use the NetCode, add Unity NetCode from the package manager.
  • If you want to use the transport but not NetCode, add Unity Transport from the package manager.
  • Package dependencies will automatically be pulled into the project

multiplayer's People

Contributors

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