Mirror/README.md

59 lines
4.6 KiB
Markdown
Raw Normal View History

2020-01-14 10:45:52 +00:00
![Mirror Logo](https://i.imgur.com/ikP9eYs.png)
2018-09-25 11:37:56 +00:00
2020-01-18 22:00:50 +00:00
[![Download](https://img.shields.io/badge/asset_store-brightgreen.svg)](https://assetstore.unity.com/packages/tools/network/mirror-129321)
2020-09-08 14:24:29 +00:00
[![Documentation](https://img.shields.io/badge/docs-brightgreen.svg)](https://mirror-networking.com/docs)
2019-11-28 15:24:12 +00:00
[![Video Tutorial](https://img.shields.io/badge/video_tutorial-brightgreen.svg)](https://www.youtube.com/playlist?list=PLkx8oFug638oBYF5EOwsSS-gOVBXj1dkP)
2018-11-13 19:55:15 +00:00
[![Forum](https://img.shields.io/badge/forum-brightgreen.svg)](https://forum.unity.com/threads/mirror-networking-for-unity-aka-hlapi-community-edition.425437/)
2020-09-08 14:23:26 +00:00
[![Build](https://img.shields.io/appveyor/ci/vis2k73562/hlapi-community-edition/Mirror.svg)](https://ci.appveyor.com/project/vis2k73562/hlapi-community-edition/branch/mirror)
2020-03-01 16:42:38 +00:00
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=vis2k_Mirror&metric=coverage)](https://sonarcloud.io/dashboard?id=vis2k_Mirror)
2018-08-04 13:03:53 +00:00
[![Discord](https://img.shields.io/discord/343440455738064897.svg)](https://discordapp.com/invite/N9QVxbM)
[![release](https://img.shields.io/github/release/vis2k/Mirror.svg)](https://github.com/vis2k/Mirror/releases/latest)
2020-09-08 14:57:33 +00:00
## Mission
2018-08-28 10:43:21 +00:00
Mirror is a **high level** Networking API for Unity, built on top of the **low level** [Telepathy](https://github.com/vis2k/Telepathy) library.
2020-09-08 14:37:10 +00:00
Mirror is built [and tested](https://www.youtube.com/watch?v=mDCNff1S9ZU) for **MMO Scale** Networking by the developers of [uMMORPG](https://assetstore.unity.com/packages/templates/systems/ummorpg-51212) and [Cubica](https://cubica.net).
2019-05-14 11:45:56 +00:00
Mirror is optimized for **ease of use** and **probability of success**. Projects that use Mirror are small, concise and maintainable. uMMORPG was possible with <6000 lines of code. We needed a networking library that allows us to [launch our games](https://mirror-networking.com/showcase/), period.
2020-09-08 14:41:32 +00:00
## Architecture
2018-08-28 10:43:21 +00:00
With Mirror, the **Server & Client are ONE** project _(hence the name)_. Instead of having one code base for the server and one for the client, we simply use the same code for both of them.
2020-09-08 14:41:32 +00:00
* **[Server]** / **[Client]** tags can be used for the server-only and client-only parts
2020-09-08 14:42:29 +00:00
* **[Command]** s are used for Client->Server communication
2020-09-08 14:41:32 +00:00
* **[ClientRpc]** / **[TargetRpc]** for Server->Client communication
2020-09-08 14:42:29 +00:00
* **[SyncVar]** s / SyncLists are used to automatically synchronize state
2018-08-28 10:43:21 +00:00
_Note: Mirror is based on Unity's abandoned UNET Networking system. We fixed it up and pushed it to MMO Scale._
2020-09-08 14:49:11 +00:00
## Low Level Transports
2020-09-08 14:36:41 +00:00
* (built in) [Telepathy](https://github.com/vis2k/Telepathy): TCP
* (built in) [UNET LLAPI](https://docs.unity3d.com/Manual/UNetUsingTransport.html): UDP
* (built in) [Ninja.Websockets](https://github.com/ninjasource/Ninja.WebSockets): Websockets
* [Apathy](https://mirror-networking.com/apathy/): Native TCP
* [FizzySteam](https://github.com/Raystorms/FizzySteamyMirror/): SteamNetwork
* [Ignorance](https://github.com/SoftwareGuy/Ignorance/): ENET UDP
* [LiteNetLib4](https://github.com/MirrorNetworking/LiteNetLibTransport/) LiteNetLib UDP
2018-11-09 14:50:35 +00:00
2020-09-08 14:49:11 +00:00
## Getting Started
Download [Mirror on the Asset Store](https://assetstore.unity.com/packages/tools/network/mirror-129321), open one of the examples & press Play!
Check out our [Documentation](https://mirror-networking.com/docs/) to learn how it all works.
If you are migrating from UNET, then please check out our [Migration Guide](https://mirror-networking.com/docs/General/Migration.html). Don't panic, it's very easy and won't take more than 5 minutes.
2020-09-08 14:56:54 +00:00
## Funding
2020-09-08 15:09:20 +00:00
Mirror is free & open source software funded by Donations. If you love it, please consider supporting [Mirror on GitHub](https://github.com/sponsors/vis2k). As reward, you'll receive our [Network Profiler](https://mirror-networking.com/docs/Guides/Profiler.html?q=Profiler), priority support access and more :)
2018-10-08 15:11:50 +00:00
## Benchmarks
2018-08-28 10:43:21 +00:00
* Telepathy [1000 connections](https://github.com/vis2k/Telepathy) test
2019-02-17 18:12:40 +00:00
* [uMMORPG 480 CCU worst case test](https://youtu.be/mDCNff1S9ZU) (everyone broadcasting to everyone else)
2020-09-08 14:57:33 +00:00
## Mirror Development
2020-09-08 15:17:47 +00:00
Mirror is used **in production** by games ranging from small indie projects to large scale MMORPGs that will run for a decade.
2020-09-08 15:17:47 +00:00
Imagine if your dream game requires networking bug fixes 10 years from now when most contributors moved on and you are left alone with the code base. It is of utmost importance that we follow the KISS principle in order for our future games to survive.
2018-06-07 13:40:15 +00:00
2020-09-08 15:17:47 +00:00
Mirror has plenty of features. What matters now is that we make them as simple, as stable and as performant as possible (in that order).
2019-03-16 10:03:03 +00:00
2020-09-08 15:17:47 +00:00
If you want to contribute, please keep that mind and understand that while **fixes** / **tests** / **improvements** are highly appreciated, new features have a low probability of being merged.