Live data from Hacker News

Thoughts on WebRTC Data Channels?

news.ycombinator.com

1–3 of 3 posts

Thoughts on WebRTC Data Channels?

#1
I'm web game developer. I've been developing my games with Web Socket technology. I was planning to try WebRTC at some point and I already started to develop a game with it. It's a fast-paced FPS shooter. I need low latency values. So I thought WebRTC might be good choice. According to Can I use website, it's only not available on IE and Edge in major web browsers.

I just want to ask, does anyone have any experience with WebRTC data channels at big scale? And should I really use it on my project? I can still go with Websocket, but I really want to try and see if it's powerful.

Re: Thoughts on WebRTC Data Channels?

#2
WebRTC is peer to peer This means that if one of your players has a slow connection, then the updates to everyone else may be slow.

The API for WebRTC is similar to WebSocket, so the client side JS should be easy to set up, except for initiating the connection. You will need to setup a STUN and perhaps a TURN server to get everyone to join correctly.

If you are using the WebRTC for voice for the player to hear, you will also need to setup a Media server, probably with SIP.

Re: Thoughts on WebRTC Data Channels?

#3

WebRTC is peer to peer This means that if one of your players has a slow connection, then the updates to everyone else may be slow. The API for WebRTC is similar to WebSocket, so the client side JS should be easy to set up, except for initiating the connection. You will need to setup a STUN and perhaps a TURN server to get everyone to join correctly. If you are using the WebRTC for voice for the player to hear, you w…

Thank you for your answer. Well, I'll plan this game in an environment that doesn't require authoritative game structure. Players will basically broadcast their position and rotation information to other players and that's all.

So even if user has low speed internet connection, we'll see him slow or laggy basically.

There are also some libraries that provides easy-to-use APIs for WebRTC. I'll prefer them in this case.

I really want to use WebRTC. Because this technology looks awesome, especially for lower latency values. I'm just thinking, it can be good choice for that kind of fast-paced game.

I looked up for some examples on web, that uses WebRTC on game, unfortunately couldn't find. So I was thinking, there should be reason for that.