I have in plan to write a real time "game" for hobby purposes. My idea is to use websockets and canvas and I want to imitate same behaviour as slither.io has, so I would like to have a feature that when user moves, other users can see his move in the same time.
First think that I had in my mind, was to use WebSockets and requestAnimationFrame, so I could for each frame emit event from the client to the server via socket and give information about my coordinates to other sockets.
My problem is that I'm troubling that this will not efficient and would kill my server with the events.
So is it good way to design real time communication in browser game or is there a better way to do this?