News for hackers. Stuff that matters.
Re:Direct Sockets API in Chrome 131 by nightowl_games on Friday November 01, 2024 @11:43PM (#42023912)
Yeah we use WebRTC for our games built on a fork of Godot 3.

https://gooberdash.winterpixel.io/

tbh the WebRTC performance is basically the same network performance as websockets and was way more complicated to implement. Maybe the webrtc perf is better in other parts of the world or something...

Re:Direct Sockets API in Chrome 131 by modeless on Saturday November 02, 2024 @12:12AM (#42024018)
Yeah WebRTC is a bear to implement for sure. Very poorly designed API. It can definitely provide significant performance improvements over web sockets, but only when configured correctly (unordered/unreliable mode) and not in every case (peer-to-peer is an afterthought in the modern internet).
Re:Direct Sockets API in Chrome 131 by nightowl_games on Saturday November 02, 2024 @12:32AM (#42024086)
We got it in unreliable/unordered and it still barely moves the needle on network perf over websockets from what we see in north america connecting to another server in north america
Re:Direct Sockets API in Chrome 131 by modeless on Saturday November 02, 2024 @12:36AM (#42024099)
I wouldn't expect a big improvement in average performance but the long tail of high latency cases should be improved by avoiding head-of-line blocking. Also peer-to-peer should be an improvement over client-server-client in some situations. Not for battle royale though I guess.

Edit: Very cool game! I love instant loading web games and yours seems very polished and fun to play. Has the web version been profitable, or is most of your revenue from the app stores? I wish I better understood the reasons web games (reportedly) struggle to monetize.

Re:Direct Sockets API in Chrome 131 by nightowl_games on Sunday November 03, 2024 @04:52PM (#42036374)
Thanks! The web versions of both of our mobile/web games do about the same as the IAP versions. We dont have ads in the mobile versions, so the ad revenue is reasonble. We're actually leaning more into smaller web games as a result of that. Profit on this game specifically I think it deserves better. I think Goober Dash is a great game, but it's not crushing it like I'd hoped.
Re:Direct Sockets API in Chrome 131 by modeless on Thursday November 07, 2024 @02:32PM (#42080020)
That's really interesting, thanks! I agree Goober Dash deserves to be successful.
Re:Direct Sockets API in Chrome 131 by windows2020 on Saturday November 02, 2024 @12:32AM (#42024087)
I would say WebRTC is both a must and only worth it if you need UDP, such as in the case of real-time video.
Re:Direct Sockets API in Chrome 131 by saurik on Saturday November 02, 2024 @02:05AM (#42024344)
I mean, the only cases where UDP vs. TCP are going to matter are 1) if you experience packet loss (and maybe you aren't for whatever reason) and 2) if you are willing to actively try to shove other protocols around and not have a congestion controller (and WebRTC definitely has a congestion controller, with the default in most implementations being an algorithm about as good as a low-quality TCP stack).
Re:Direct Sockets API in Chrome 131 by modeless on Saturday November 02, 2024 @02:36AM (#42024468)
Out-of-order delivery is another case where UDP provides a benefit.