So I was just making a casual game I wanted to play with my friends. Even though I had no experience in Playcanvas, it seemed promising. I am happy to see that it is a great engine. But I am having a problem with the multiplayer. I can’t see other players. I used the following tutorial-
https://developer.playcanvas.com/en/tutorials/real-time-multiplayer/
Here is my project-
https://playcanvas.com/editor/scene/1925914
I would really appreciate it.
It looks like the original project also doesn’t work at the moment.
Does the original project work for you?
By the original project, do you mean the tutorial project? If so, then no, the tutorial project also doesn’t seem to work. I opened it in multiple tabs but I just saw one capsule. My walking code is different from the Tutorial too, does that affect anything?
It looks like the tutorial project is broken.
Hopefully the @playcanvas_team is be able to fix this.
it looks like playcanvas has a CORS policy misconfiguration, however, socket.io.min.js is loaded fine from (cloudflare). this websockets attempts to connect to a 3rd party server (via websockets):
the referrer is a playcanvas domain (the project is hosted there) which is a bit of a red herring. the socket is attempting to connect to harmonious-daily-oriole.me or sore-bloom-beech.glitch.me i think somebody edited the following line as a fix:
var socket = io.connect('https://harmonious-daily-oriole.me'); // Glitch hosted server
Which, for me, give a net::ERR_NAME_NOT_RESOLVED error. Maybe harmonious used to redirect to glitch and the project didnt change but this 3rd party site did.
The problem is this server being down and / or having CORS cross site scripting restrictions so that their API is not accessible from another website (technically: not accessible from the users browser when navigated to a domain that is not the same as the 3rd party domain).
Thanks. Since the server is down, there’s nothing I can do about it though, so is there any other method that i can use?
I tried the photon one and get two players if I launch the game twice (make sure to move them to see both, they get spawn at the same spot)
The example project is fixed and improved!