DEV Community

Discussion on: How to use Socket.IO and build your first multiplayer game!

Collapse
 
dridritwo profile image
Adrien Auxent

The socket part was on the server side.
What I got wrong was I didn't realise I should place the listener inside the "io.on('connection', (socket) => {})" , and not after it.
And yeah, I took the github files for HTML and CSS. I am glad I didn't have to write that one down line by line. But there was still some lissing JS lines to have a working home and start button. I could ifigure it out from your exemple though.

Thread Thread
 
kubeden profile image
Kuberdenis • Edited

Aah, I see. Anyway, you figured it out, which is great! Also, if somebody else stood upon the same problem, they will have the solution, so thanks for the comment!