Multiplayer Unity Game + WebRTC in 5 minutes
Tags: unity3d, peertopeer, webrtc, gamedev
Published: 2021-01-07 08:16:58

---
title: Multiplayer Unity Game + WebRTC in 5 minutes
published: true
date: 2020-12-31 17:46:47 UTC
tags: unity3d,peertopeer,webrtc,gamedevelopment
canonical_url: https://medium.com/coinmonks/multiplayer-unity-game-webrtc-in-5-minutes-71971be769d1
---

#### A Unity plugin for peer to peer games using WebRTC. Create a WebGL multiplayer game in 5 minutes.

![](https://cdn-images-1.medium.com/max/1024/1*EYm6f8ev_KVYhlb3gtnddg.png)

{% youtube be9VtUymNPs %}

### Overview

Social distancing has led us to find other forms of communication. Video chat, social media, and **multiplayer games** have become more than entertainment. It’s how we stay sane.

As these forms become more important, the tools used to build it must become faster and easier to use. Tools that can enable game developers to build their hyper-casual game in a weekend. Which leads me to a story.

### My Multiplayer Experience

Having built a few single player games, I was ready to experiment with multiplayer. I dove into the Unity’s Multiplayer and Networking manual and found:

> **Note** : UNet is deprecated, and will be removed from Unity in the future. A new system is under development.

I then looked into alternatives to find that it’s quite fragmented and spent many weeks learning the complexities of networking. The plugins were bigger than the game itself. It did not make sense to use a complex networking plugin for a hyper-causal browser game.

I just want two players to move on the screen!

### Peer to Peer multiPlayer Plugin’ Play

As a gamer, would it be nice to share a link with your friend and start playing instantly?

As a developer, would it be nice to build a multiplayer game without paying for another server?

This project is to experiment with a technology called WebRTC.

> Web Real-Time Communications (WebRTC) is a free, open-source project that provides web browsers and mobile applications with real-time communication via simple application programming interfaces

WebRTC is similar to websockets, but does not require a server. Think, your web browser sending data directly to your friend. No third party.

This method cuts costs and makes the network completely decentralized (if you’re into that).

The next step is to make it simple. The goal of this plugin is handle the networking _stuff_ like creating offers/answers so you can focus on building the actual game. Simply drag and drop the script into the player Game Object and you’re done.

### Alpha

This project is highly experimental and would love to get feedback. For more info contact us directly on [Discord](https://discord.gg/zsZFAP5fWx).

Stay safe and connected.

![](https://cdn-images-1.medium.com/max/1024/0*Jh-pWMgRXSFuLXVR)<figcaption>Photo by <a href="https://unsplash.com/@jeshoots?utm_source=medium&amp;utm_medium=referral">JESHOOTS.COM</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption>

#### Also, Read

- [Learn Ethereum and Web3 development](http://blog.coincodecap.com/go/learn)
- The Best [Crypto Trading Bot](https://medium.com/coinmonks/crypto-trading-bot-c2ffce8acb2a)
- [3Commas Review](https://medium.com/coinmonks/3commas-review-an-excellent-crypto-trading-bot-2020-1313a58bec92)
- [Pionex Review](https://medium.com/coinmonks/pionex-review-exchange-with-crypto-trading-bot-1e459d0191ea)
- [AAX Exchange Review](https://medium.com/coinmonks/aax-exchange-review-2021-67c5ea09330c) | Referral Code, Trading Fee, Pros and Cons
- [Deribit Review](https://medium.com/coinmonks/deribit-review-options-fees-apis-and-testnet-2ca16c4bbdb2) | Options, Fees, APIs and Testnet
- [FTX Crypto Exchange Review](https://medium.com/coinmonks/ftx-crypto-exchange-review-53664ac1198f)
- [NGRAVE ZERO review](https://medium.com/coinmonks/ngrave-zero-review-c465cf8307fc)
- [Bybit Exchange Review](https://medium.com/coinmonks/bybit-exchange-review-dbd570019b71)
- [3Commas vs Cryptohopper](https://medium.com/coinmonks/3commas-vs-pionex-vs-cryptohopper-best-crypto-bot-6a98d2baa203)
- The Best Bitcoin [Hardware wallet](https://medium.com/coinmonks/the-best-cryptocurrency-hardware-wallets-of-2020-e28b1c124069?source=friends_link&sk=324dd9ff8556ab578d71e7ad7658ad7c)
- [Crypto Copy Trading Platforms](https://medium.com/coinmonks/top-10-crypto-copy-trading-platforms-for-beginners-d0c37c7d698c)
- Best [monero wallet](https://blog.coincodecap.com/best-monero-wallets)
- [ledger nano s vs x](https://blog.coincodecap.com/ledger-nano-s-vs-x)
- [Bitsgap vs 3Commas vs Quadency](https://blog.coincodecap.com/bitsgap-3commas-quadency)
- The Best [Crypto Tax Software](https://medium.com/coinmonks/best-crypto-tax-tool-for-my-money-72d4b430816b)
- [Best Crypto Trading Platforms](https://medium.com/coinmonks/the-best-crypto-trading-platforms-in-2020-the-definitive-guide-updated-c72f8b874555)
- Best [Crypto Lending Platforms](https://medium.com/coinmonks/top-5-crypto-lending-platforms-in-2020-that-you-need-to-know-a1b675cec3fa)
- [Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X](https://blog.coincodecap.com/ledger-nano-s-vs-trezor-one-ledger-nano-x-trezor-t)
- [BlockFi vs Celsius](https://medium.com/coinmonks/blockfi-vs-celsius-vs-hodlnaut-8a1cc8c26630) vs Hodlnaut
- [Bitsgap review](https://medium.com/coinmonks/bitsgap-review-a-crypto-trading-bot-that-makes-easy-money-a5d88a336df2) — A Crypto Trading Bot That Makes Easy Money
- [Quadency Review](https://medium.com/coinmonks/quadency-review-a-crypto-trading-automation-platform-3068eaa374e1)- A Crypto Trading Bot Made For Professionals
- [PrimeXBT Review](https://medium.com/coinmonks/primexbt-review-88e0815be858) | Leverage Trading, Fee and Covesting
- [Altrady review](https://blog.coincodecap.com/altrady-reivew)
- [Ellipal Titan Review](https://medium.com/coinmonks/ellipal-titan-review-85e9071dd029)
- [SecuX Stone Review](https://blog.coincodecap.com/secux-stone-hardware-wallet-review)
- [BlockFi Review](https://medium.com/coinmonks/blockfi-review-53096053c097) | Earn up to 8.6% interests on your Crypto
- [Coinrule review](https://blog.coincodecap.com/coinrule-review-a-perfect-trading-bot)
- [Best Blockchain Analysis Tools](https://bitquery.io/blog/best-blockchain-analysis-tools-and-software)
- [Crypto arbitrage](https://medium.com/coinmonks/crypto-arbitrage-guide-how-to-make-money-as-a-beginner-62bfe5c868f6) guide: How to make money as a beginner
- Best [Crypto Charting Tool](https://medium.com/coinmonks/what-are-the-best-charting-platforms-for-cryptocurrency-trading-85aade584d80)
- What are the [best books to learn about Bitcoin](https://medium.com/coinmonks/what-are-the-best-books-to-learn-bitcoin-409aeb9aff4b)?

> [Get Best Software Deals Directly In Your Inbox](https://medium.com/coinmonks/newsletters/coinmonks)

[![](https://cdn-images-1.medium.com/max/584/1*BoDnKUyK8p4hitHAJZ5Pdw.png)](https://medium.com/coinmonks/newsletters/coinmonks)

* * *