Real Time Multiplayer Issue?

I followed your tutorial step by step, but the multiplayer thing is not working even the movement stops working when i launch it on local?
Tutorial followed: http://developer.playcanvas.com/en/tutorials/legacy/advanced/real-time-multiplayer/

Are you getting any error messages in the console? What do you mean by ‘not working’?

Steven, when I run the server the loading takes alot of time and i get three errors,
Script: http://localhost:3000/socket.js failed to load
Script: http://localhost:3000/Network.js failed to load
Script: http://localhost:3000/Movement.js failed to load

@ateeqa_altaf you have to learn to debug. It is essential skill for a developer. You cannot always rely on others be nice and helpful. It is same as doing your own homework in school - if you copy it from others, you wont learn, and eventually wont perform.

So please, do not rush, take slow but steady steps to progress.
Think and experiment widely, don’t go to forum with any small problem. As problem solving - is precious skill you will be using whole your life, and it is important to learn it.

Yes you’re right, I was always shy to ask in forums, but unfortunately I can’t find enough learning content for playcanvas, that’s the only reason I bug you guys alot :frowning:

In web development, 95% of content for learning - is in debugging. There is all information you usually need to investigate what is the problem.

In fact, when you show a problem in project, other users will be able to help you by doing debugging - exact thing that you have to learn to do. It is all about debugging, and experimentation. Learning - is process of investigation, and puzzle solving. It is not just reading and replicating.

1 Like

Alright Max, I will try to solve it myself :slight_smile:

So looking at those errors, it means that there is something wrong with loading the files on the server. I would check that the server has been configured and started correctly and work from there.

PlayCanvas is still vanilla Javascript so any resource about Javascript applies. socket.io is a ‘standard’ library rather then something that is specific to PlayCanvas.

Steven, I followed everything as stated in tutorial. I am good with node.js but still I don’t know how to manage Playcanvas with Node. I am confused about how to access playcanvas scripts and html files

You local server is most likely not running, or being blocked by firewall, leading to files from it to be inaccessible.

More importantly, why are you following a legacy scripting system tutorial. You should be following the updated version:

http://developer.playcanvas.com/en/tutorials/advanced/real-time-multiplayer/

Isn’t it the same link you shared? it’s in the legacy scripting system.

My server does get start, I still don’t know what’s the problem… I am literally at close end :frowning: