Real Time Multiplayer Tutorial

Hey Dane,

So I’ve actually made a multiplayer game with PlayCanvas for Ludum Dare a while ago. I remember trying to fix that tutorial but it’s hard without having access to the source project and the server.

I think the problem here is just that PlayCanvas is running on https but the server is on http, so browsers block that by default.

Here’s a version I just threw together that should be working.

https://playcanvas.com/project/526224/overview/real-time-multiplayer-example

The server is running here:

You can make a fork of it yourself so you can edit it/restart it as you please. I expanded on it slightly from the tutorial to make disconnecting and deleting players work.

I’ve also written a more in-depth tutorial on how to set up multiplayer with Socket.io that, while it’s not specifically for PlayCanvas, it’ll give you enough background to know where all the pieces need to go:

We could also try just improving the one on PlayCanvas if you tell me what specifically you got stuck on if you get it working after looking at my version.

2 Likes