Browser Html5 Real-time Game. Broadcast Game State Options
I'm making real time game for facebook. Now I broadcast state using websockets. But for real-time data udp is much better. I found out that there is WebRTC out there. But I can't u
Solution 1:
You can definitely build or use a server-side component that will support WebRTC data channels; from the browser/client perspective, it will just be another peer.
Strictly speaking, WebRTC data channels aren't UDP based but SCTP based; but in practice, they provide the kind of flexibility you would need for real-time data exchange (with e.g. the ability to set up connections that favor low latency over reliability).
An example of a server-side component to use data channels would be https://www.npmjs.com/package/rtc-dcstream
Post a Comment for "Browser Html5 Real-time Game. Broadcast Game State Options"