Mirror/README.md

106 lines
7.0 KiB
Markdown
Raw Normal View History

2020-09-18 14:36:10 +00:00
![Mirror Logo](https://i.imgur.com/we6li1x.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)
[![Documentation](https://img.shields.io/badge/docs-brightgreen.svg)](https://mirror-networking.gitbook.io/)
2020-11-11 13:56:52 +00:00
[![Showcase](https://img.shields.io/badge/showcase-brightgreen.svg)](https://mirror-networking.com/showcase/)
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-12-16 03:09:53 +00:00
[![Roadmap](https://img.shields.io/badge/roadmap-blue.svg)](https://trello.com/b/fgAE7Tud)
2020-09-08 16:11:26 +00:00
**Stop worrying about networking. Because we do.**
2020-09-08 16:10:27 +00:00
2020-09-08 16:11:26 +00:00
## Mirror
2020-09-08 16:34:17 +00:00
Mirror is a **high level** Networking library for Unity, compatible with different **low level** [Transports](https://github.com/vis2k/Mirror#low-level-transports).
2020-09-08 16:32:43 +00:00
Mirror is for small indie games & large scale [MMOs](https://www.youtube.com/watch?v=mDCNff1S9ZU), made by the developers of [uMMORPG](https://assetstore.unity.com/packages/templates/systems/ummorpg-components-edition-159401) and [Cubica](https://www.youtube.com/watch?v=D_f_MntrLVE).
Mirror is optimized for **ease of use** & **probability of success**.
2020-09-08 16:22:10 +00:00
2020-09-09 08:08:47 +00:00
We needed a networking library that allows us to **[launch our games](https://mirror-networking.com/showcase/)** and **survive the next decade**.
2020-09-08 14:41:32 +00:00
## Architecture
2020-09-08 16:31:43 +00:00
The **Server & Client** are **ONE project** in order to achieve an order of magnitude gain in productivity.
2020-09-08 15:36:34 +00:00
2020-09-08 15:37:39 +00:00
Making multiplayer games this way is fun & easy. Instead of MonoBehaviour, Mirror provides **NetworkBehaviour** components with:
2020-09-08 15:41:47 +00:00
* **[Server]** / **[Client]** tags for server-only / client-only code
2020-09-08 15:42:28 +00:00
* **[Command]** for Client->Server function calls (e.g. UseItem)
2020-09-08 15:41:47 +00:00
* **[ClientRpc]** / **[TargetRpc]** for Server->Client function calls (e.g. AddChatMessage)
2020-09-08 15:42:01 +00:00
* **[SyncVar]** / SyncList to automatically synchronize variables from Server->Client
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
2021-05-18 14:59:38 +00:00
* (built in) [KCP](https://app.gitbook.com/@mirror-networking/s/docs/transports/kcp-transport): reliable UDP
* (built in) [Telepathy](https://app.gitbook.com/@mirror-networking/s/docs/transports/telepathy-transport): TCP
* (built in) [Websockets](https://app.gitbook.com/@mirror-networking/s/docs/transports/websockets-transport): Websockets
2020-11-01 13:05:39 +00:00
* Libuv: TCP powered by Node.js' native C networking
2020-09-09 09:13:31 +00:00
* [LiteNetLib](https://github.com/MirrorNetworking/LiteNetLibTransport/) UDP
* [Ignorance](https://github.com/SoftwareGuy/Ignorance/): ENET UDP
2021-05-18 14:59:38 +00:00
* [FizzySteam](https://github.com/Chykary/FizzySteamworks/): SteamNetwork
* [FizzyFacepunch](https://github.com/Chykary/FizzyFacepunch/): SteamNetwork
* [Epic Relay](https://github.com/FakeByte/EpicOnlineTransport): Epic Online Services
* [Light Reflective Mirror](https://github.com/Derek-R-S/Light-Reflective-Mirror): Self-Hosted Relay
* [Oculus P2P](https://github.com/hyferg/MirrorOculusP2P): Oculus Platform Service
2018-11-09 14:50:35 +00:00
2020-09-08 14:49:11 +00:00
## Getting Started
2021-03-13 04:30:33 +00:00
Get **Unity 2019 LTS**, download [Mirror on the Asset Store](https://assetstore.unity.com/packages/tools/network/mirror-129321), open one of the examples & press Play!
2020-09-08 14:49:11 +00:00
Check out our [Documentation](https://mirror-networking.gitbook.io/) to learn how it all works.
2020-09-08 14:49:11 +00:00
If you are migrating from UNET, then please check out our [Migration Guide](https://mirror-networking.gitbook.io/docs/general/migration-guide).
2020-09-08 14:49:11 +00:00
2020-11-11 13:24:21 +00:00
## Made with Mirror
2020-11-11 13:32:20 +00:00
![Population: ONE](https://steamcdn-a.akamaihd.net/steam/apps/691260/header.jpg?t=1603846067)<br/>
2020-11-11 13:21:16 +00:00
[Population: ONE](http://www.populationonevr.com/)
2020-11-11 13:19:51 +00:00
2020-11-11 13:32:20 +00:00
![Zooba](https://i.imgur.com/4TY0XoY.png)<br/>
2020-11-11 13:24:21 +00:00
[Zooba](https://wildlifestudios.com/games/zooba/)
2020-11-11 13:32:20 +00:00
![SCP: Secret Laboratory](https://steamcdn-a.akamaihd.net/steam/apps/700330/header.jpg?t=1604668607)<br/>
2020-11-11 13:26:49 +00:00
[SCP: Secret Laboratory](https://store.steampowered.com/app/700330/SCP_Secret_Laboratory/)
2020-11-11 13:31:51 +00:00
![Naïca Online](https://i.imgur.com/VrBqvtz.png)<br/>
2020-11-11 13:28:33 +00:00
[Naïca Online](https://naicaonline.com/)
2020-11-12 15:59:26 +00:00
![Laurum Online](https://i.imgur.com/2I8wnxO.png)<br/>
[Laurum Online](https://laurum.online/)<br/>
2021-03-10 04:09:54 +00:00
And [many more](https://mirror-networking.com/showcase/)...
2020-09-08 14:56:54 +00:00
## Funding
2021-03-10 03:46:16 +00:00
Mirror is free & open source software funded by [Donations](https://github.com/sponsors/vis2k). 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.gitbook.io/docs/guides/network-profiler), priority support and more :)
2018-10-08 15:11:50 +00:00
## Benchmarks
2019-02-17 18:12:40 +00:00
* [uMMORPG 480 CCU worst case test](https://youtu.be/mDCNff1S9ZU) (everyone broadcasting to everyone else)
2021-01-25 02:03:43 +00:00
* [Latest Results](https://docs.google.com/document/d/1GMxcWAz3ePt3RioK8k4erpVSpujMkYje4scOuPwM8Ug/edit?usp=sharing)
2020-09-08 15:18:05 +00:00
## Development & Contributing
2020-09-08 15:23:04 +00:00
Mirror is used **in production** by games ranging from small indie projects to large scale MMOs that will run for a decade or more.
2020-09-08 15:23:39 +00:00
10 years from now if your players encounter a networking bug and most of our contributors already moved on, someone will need to fix it. Therefore it is of utmost importance for us to follow the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle) in order for our games to survive.
2018-06-07 13:40:15 +00:00
2020-09-08 15:22:33 +00:00
Keeping the next decade in mind, contributing **fixes** / **tests** / **improvements** is highly appreciated while new features have a low probability of being merged.
2019-03-16 10:03:03 +00:00
2020-09-08 15:22:33 +00:00
_At this point, what we don't add to Mirror is more important than what we do add to it!_
2021-03-10 03:38:49 +00:00
# Bug Bounty
2021-03-10 03:43:07 +00:00
<img width="470" src="https://user-images.githubusercontent.com/16416509/110572995-718b5900-8195-11eb-802c-235c82a03bf7.png">
2021-03-10 03:41:39 +00:00
2021-03-11 04:18:40 +00:00
A lot of projects use Mirror in production. If you found a critical bug / exploit in Mirror core, please reach out to us in private.
2021-03-10 03:38:49 +00:00
Depending on the severity of the exploit, we offer $50 - $500 for now.
2021-03-10 03:45:42 +00:00
Rewards based on Mirror's [donations](https://github.com/sponsors/vis2k), capped at amount of donations we received that month.
2021-03-10 03:38:49 +00:00
2021-03-10 03:39:19 +00:00
**Specifically we are looking for:**
2021-03-10 03:38:49 +00:00
* Ways to crash a Mirror server
* Ways to exploit a Mirror server
* Ways to leave a Mirror server in undefined state
We are **not** looking for DOS/DDOS attacks. The exploit should be possible with just a couple of network packets, and it should be reproducible.
2021-03-10 03:39:19 +00:00
**Credits / past findings / fixes:**
2021-03-10 03:49:37 +00:00
* 2020, fholm: fuzzing ConnectMessage to stop further connects [[#2397](https://github.com/vis2k/Mirror/pull/2397)]