1.3.0 • Published 2 years ago

edge-multiplay v1.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

NPM npm

Edge-Mutiplay NodeJS Server

EdgeMultiplay is an open source multiplayer game server that works with EdgeMultiplay Unity Client. The server is built using NodeJS and we provide a ready made client written in C# Unity.

Documentation

For more information on how to use the server, please refer to the server documentation here

Prerequisites

EdgeMultiplay Unity Client Tutorials

Video Tutorials

Discord server

Usage

Using npm:

Download EdgeMultiplay Module from npm

npm install edge-multiplay

Example of Usage

const edgeMultiplay = require('edge-multiplay')() //you can specify your ports here see example.js

edgeMultiplay.wsServer.on('newConnection',(path, connection)=>{
  // your logic goes here 
  // On success call
  edgeMultiplay.addToLobby(connection)
  // On failure call edgeMultiplay.rejectConnection(connection)
})

Using docker:

docker pull mobiledgexsamples/edge-multiplay
docker run -d -p 3000:3000 -p 7776:7776 -p 5000:5000/udp mobiledgexsamples/edge-multiplay

Unity client configuration to run locally:

  • In EdgeManager check Use Local Host Server
  • Specify the Host IP Address

For more information on how to run the server locally, please refer to our setup guide on the MobiledgeX Developer Portal.