I am making a game framework with Socket.IO. The game currently has players that seem to not be connected, and a not working canvas with key events. Please tell me what I’m missing!
Is the Repl private? I’m getting a 404 error.
Sorry, the link is http://repl.it/@element1010/SocketIO-test?v=1
P.S. I don’t use private Repls, I don’t have cycles (which would be appreciated)
Try to change all
socket.on inside the connection handler to
user.on , so you can treat users individually.
Other thing that I noticed is that you are initializing the player respawn at 50,50 but you are not updating their movement, this might cause the players to appear in the same spot and being unable to move.
It may have other things too but that’s all I can find by now.
I don’t really get it, can I invite you to collaborate?
I have a Socket.IO template you might want to check out
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.