/PlanetaMatchMaker

A very simple and light match making system for P2P online game. Server binary for linux and windows, and client library for C# including Unity are provided.

Primary LanguageC#MIT LicenseMIT

Release License CircleCI Buld and Test Status

Planeta Match Maker

README (日本語)

A very simple and light match making system for P2P online game. Server binary for linux and windows, and client library for C# including Unity are provided.

Features

  • Creating room and joining room
  • Searching room by owners name
  • NAT traversal
    • Builtin Mode: Attemt to establish P2P connection by port mapping auto creation with UPnP
    • Steam Relay Mode: Help to exchange SteamID64 to establish P2P connection for Steam relay service
  • (Not implemented now) Random Matching

Platforms

Server

A binary which is executable in below platforms.

  • Windows
  • Linux

For linux, extremely small docker image is also provided in DockerHub.

Client

A library by below languages and platforms.

  • C# (.Net Framework or .Net Core which is campatible with .Net Standard 2.1)
  • Unity (.Net 4.0)

Usage

You can easily install and use server and client.

Server

Docker

You can very easily install server by using docker by following steps.

  1. Pull docker image with tag cdec/plaenta-match-maker:server-alpine
  2. Run a container with the image

Following commands are example to run a server with port 57000 by using docker.

docker pull cdec/plaenta-match-maker-server:latest
docker run -p 57000:57000 cdec/planeta-match-maker-server:latest

You may need to set firewall to acceppt recieve connection of TCP port which is defined in the setting file.

You can change settings by editing the setting file if you need.

Mannual

In linux and windows, you can install server by manually by following steps.

  1. Download a binary from release page
  2. Put the binary to any place you like
  3. Put the setting file to /etc/pmms/setting.json
  4. Execute the binary

You may need to set firewall to acceppt recieve connection of TCP port which is defined in the setting file.

You can change settings by editing the setting file if you need.

Client

C#

  1. Download source codes from release page or clone this repogitory
  2. Put source codes in PlanetaMatchMakerClient/Source directory to your project

Unity (Unity Package)

  1. Download unity package from release page
  2. Import the unity package to your project

Unity (Mannual)

  1. Download source codes from release page or clone this repogitory
  2. Copy all files in PlanetaMatchMakerUnityClient/Assets to Assets directory of your unity project

Steam Integration in Client

  1. Install steamworks library for C# in below table
  2. Set pre-defined macro of compiler in below table
  3. Add using PlanetaGameLabo.MatchMaker.Extentions; in your code
  4. Use MatchMakerClient.CreateRoomWithSteamAsync and MatchMakerClient.JoinRoomWithSteamAsync

Note that enabling Facepunch.Steamworks and Steamworks.NET at same time is not supported.

Name Macro Repository
Facepunch.Steamworks PMM_FacepunchSteamworks URL
Steamworks.NET PMM_SteamworksNET URL

Documents

License

The codes in this repository except codes from other repositories are lisenced unfer the MIT License.

This repogitory includes following libraries from other repogitories. The licenses of these codes follows each repogitories.