Open MaZZly opened 5 years ago
Hi MaZZly
Good luck with your game. uwebsockets sounds interesting, and thanks for pointing me to that reddit thread.
Truth is that I want to move towards UDP, which probably means dropping websockets altogether. This is what non-javascript (i.e. real) games use, and provides a much better experience. However last time we checked UDP was still tricky to use in node-js environments.
It's very high on the wish-list...
Yeah ofc better latency is always a plus (as long as it also scales)
Have you checked out https://www.npmjs.com/package/wrtc ? Seems to be handling WebRTC with node?
This might be interesting if you are starting to write the client-server handling with WebRTC: http://blog.brkho.com/2017/03/15/dive-into-client-server-web-games-webrtc/
Found this thread that boasts quite nice numbers for uWS: https://github.com/socketio/engine.io/issues/388
I was mostly interested in the uWS vs socket.io because there seems to be a benefit CPU-load wise.. And swapping it out doesn't seem like it should be too much work? as uWS was written to be easy to plug in.
@MaZZly The problem is that there are no good node-server based implementation for WebRTC, especially ones that implement unreliable data channels properly. WebRTC in itself was designed to work peer-to-peer rather than with server-client star topology
So while waiting for something good along the lines of WebRTC to come along, maybe uWebSockets could be put in place? https://github.com/uNetworking/uWebSockets.js
UDP is sure the way to go, but hard to do in browsers. One question though: why not just use vanilla js websockets instead of uwebsockets / socket.io / or any other wrapper?
I tested http://geckos.io/ . It does WebRTC with UDP channels
Could this be used for lance?
@OpherV @namel do you have any input/comments for the above Geckos suggestion? I feel like this is quite an important part of getting a multiplayer game to run smoothly with low latencies. And now it seems it would be quite easy to implement? (hopefully) :)
The demo from the Geckos.io repo has quite a good comparison: https://www.youtube.com/watch?v=ZEEBsq3eQmg
Hi,
First of all, awesome framework! Finally gotten started writing a game I've wanted to make for like 3 years.
I was researching today about scalability of server nodes and stumbled upon this interesting reddit thread: https://www.reddit.com/r/gamedev/comments/6gjgnx/backend_scaling_for_multiplayer_html5_games/
There they mention that socket.io is not so good and mention that uwebsockets is performing better.
Could this maybe be something worth considering for the websocket communications?