We’re working on a multiplayer game and i’m wondering if there’s a way to have both server and client in the game inside the browser, as I’m searching in google and in every example I find, the server is running standalone outside the browser. Is it possible?
Peer to peer connection is possible using WebRTC. It still will require small signalling server that is used to establish connection between peers in order to go around NAT and firewalls.
But tbh, webrtc - is a damn mess. Last time I’ve tried to make a simple app, I failed badly. Maybe I was looking totally in wrong direction, but I found it very frustrating and complicated badly designed API and system around it.
Max, I haven’t tried socket.io peer to peer, so I don’t know much about it. I am a happy user of socket.io client server. Last time I was looking into it, you could get a free signaling host for low traffic, so hosting shouldn’t be a problem.