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.
- 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
A binary which is executable in below platforms.
- Windows
- Linux
For linux, extremely small docker image is also provided in DockerHub.
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)
You can easily install and use server and client.
You can very easily install server by using docker by following steps.
- Pull docker image with tag
cdec/plaenta-match-maker:server-alpine
- 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.
In linux and windows, you can install server by manually by following steps.
- Download a binary from release page
- Put the binary to any place you like
- Put the setting file to
/etc/pmms/setting.json
- 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.
- Download source codes from release page or clone this repogitory
- Put source codes in
PlanetaMatchMakerClient/Source
directory to your project
- Download unity package from release page
- Import the unity package to your project
- Download source codes from release page or clone this repogitory
- Copy all files in
PlanetaMatchMakerUnityClient/Assets
toAssets
directory of your unity project
- Install steamworks library for C# in below table
- Set pre-defined macro of compiler in below table
- Add
using PlanetaGameLabo.MatchMaker.Extentions;
in your code - Use
MatchMakerClient.CreateRoomWithSteamAsync
andMatchMakerClient.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 |
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.