Multiplayer boilerplate

Happy New Year 2022 everyone. Does anyone know the status or have thoughts on rolling your own multiplayer services? I’ve looked at various SaaS solutions (Photon, etc). But I’m really looking at creating more of a ubiquitous, roll-your-own, open source solution (for my own value added purposes).

I’ve checked out the multiplayer tutorial and came across Looks like the same author and former associate with Playcanvas. I’m debating on mulling through boilerplate’s code or rolling my own with simple-peer (a PeerJS spinoff). Thoughts for self-hosted multiplayer services? My requirements are for setting up a group data-channel and voice channel.

I don’t mind getting dirty with vagrant/docker/Linux hardware.

Hi @Steveorevo,

Many wishes for a happy new year.

What are your requirements for this multiplayer project? Do you require authoritative states?

Since you mention peer to peer connectivity, then you may not need to setup a dedicated server. The boilerplate project you mention requires setting up a node.js server.

But if you are only looking at connecting 2 peers then a WebRTC solution may be easier to get on with.

I am looking at lower level code. WebRTC (via simple-peer) appears simple enough. I do intend to lift entity synchronizing from the boilerplate project; I just didn’t know what the state of that is or if it’s an active work-in-progress. The requirement for a voice channel looks like it can also ride a top

Ultimately I’d like to integrate this with an existing website that manages existing users and capabilities. It looks like I’ll be venturing down the route of setting up a box with a TURN/STUN server to play with but was curious if anyone has an inside word on an existing project. Or perhaps if Playcanvas (corporate) has explored anything in the future as a SaaS offering to existing editor clients? Just speculating as the boilerplate looks like it came from a playcanvas core developer…

WebRTC is quite powerful for data/voice/video p2p networking. You can even accommodate slightly more than 2 players with a carefully executed full mesh. But it can be troublesome to navigate (and maintain) through all of its complexities (browser compatibility, maintaining TURN servers, signaling/handshaking).

Given that PlayCanvas deploys on the web, there are plenty of SaaS services, as you say, that can help with that.

I can’t comment if PlayCanvas has any plans in offering a similar service (@yaustar @will may be able to), but I imagine most likely they don’t since it’s easy to integrate a 3rd party service (both p2p and server/cloud based) as a networking layer.

The boilerplate project was an open source contribution from an ex PlayCanvas team member.

We aren’t looking into providing our own solution.

However there is a Photon boilerplate example here by one of our community members: Photon Multiplayer Guide & Starter Kit

And another from the Colyseus team for their own services: Multiplayer Demo - Using Colyseus Multiplayer Gaming Framework

The project linked above: is running PlayCanvas on the server to make it easier to write logic once but for both the client and server but as Leonidas has mentioned above, is not done by the PlayCanvas team themselves.


I’ve decided to utilize the open source project (and optional free WebRTC service) from Jitsi Meet. It supports voice, video, and data channels as well as a promising, low-latency, scalable architecture. While touted as a “video conferencing” service; it appears to be much more than that. If anyone else is interested in collaborating in this space; feel free to message me. I’m currently just testing it, but so far appears functional.