TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GameNetworkingSockets – Reliable and unreliable messages over UDP

157 pointsby ivanfonabout 7 years ago

7 comments

Animatsabout 7 years ago
Second Life does something very similar. Reliable and unreliable messages, binary format, multiple messages in a single datagram.<p>Unreliable messsages are for ones that are superseded by later messages. There&#x27;s no point in retransmitting; you always want the latest object positions.<p>The big problem is message priority. Games need a low-latency, low-traffic channel for updates and a high-latency, high-traffic channel for assets. It&#x27;s tough making this work on the open Internet. End to end QoS just isn&#x27;t widely available. So using much less than the full available bandwidth is needed to keep intermediate FIFO buffers from filling up. This is related to the &quot;bufferbloat&quot; problem - network devices now all have lots of RAM, and if they have FIFO queuing and less output bandwidth than input bandwidth, they will build up huge queues that generate huge latency.<p>For QoS to work in the wild, there has to be some throttling or incentive to discourage too much high priority traffic. You&#x27;d like to have under 5% of your traffic at high priority. It&#x27;s hard to make this work in the public Internet.
评论 #16726282 未加载
评论 #16725113 未加载
评论 #16729445 未加载
评论 #16725185 未加载
calebhabout 7 years ago
I&#x27;ve used ENet for my games which is pretty similar to this project. Unfortunately ENet does not support IPv6, and the pull requests on the ENet repository appear to be ignored. The ENet author refuses to accept any changes that break the ABI, which is highly unfortunate.<p><a href="http:&#x2F;&#x2F;enet.bespin.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;enet.bespin.org&#x2F;</a>
johnhenryabout 7 years ago
&gt; GameNetworkingSockets is a basic transport layer for games.<p>I understand that this is primarily derived from a gaming platform, but is there anything that makes this useful specifically &quot;for game&quot; and not networked applications in general?
评论 #16726485 未加载
xir78about 7 years ago
Would be great for TCP to better address the reliable transmission of messages for games, these “reliable UDP” code bases in game engines don’t address all of the other issues such as bandwidth sharing fairness and avoiding saturation of networking links, which ultimately will just make networks slower than faster and more reliable for everyone.
评论 #16724840 未加载
评论 #16725618 未加载
评论 #16724875 未加载
bluejekyllabout 7 years ago
Anyone know how this differs from RTP?<p>I haven’t worked with either but did review the RTP spec, and many of these features appear similar.<p>RTP also has some multicasting features built in for broadcast delivery, which can be useful in certain contexts.<p>Edit: the reason I ask is that RTP is getting wide scale deployment and testing as it’s being used for WebRTC.
评论 #16725341 未加载
popeeabout 7 years ago
Stupid question. How do you solve (de)fragmentation and out of order delivery with unreliable protocol? What are cases and is it possible to make it simple?
评论 #16725593 未加载
评论 #16727127 未加载
limaoscarjulietabout 7 years ago
The moment you say &quot;reliable messages with UDP&quot; you really are saying &quot;we are implementing TCP on our own&quot;, which quickly turns into question &quot;why?&quot;.<p>By its own admission, the project says: &quot;The reliability layer is a pretty naive sliding window implementation&quot;. A bit scary if you really want to have guarantee message is delivered.<p>Also scary part: &quot;Our use of OpenSSL is extremely limited; basically just AES encryption&quot;, &quot;we do not support x509 certificates&quot;. OpenSSL is difficult, coming up with your own key exchange is likely problematic.<p>So I&#x27;m still searching for the answer as to why we need to do this? What&#x27;s the market for this?<p>P.S. Yes, Valve being the author certainly brings some &quot;reedeming value&quot; to this!
评论 #16724828 未加载
评论 #16724975 未加载
评论 #16725829 未加载
评论 #16724793 未加载
评论 #16725047 未加载
评论 #16725353 未加载
评论 #16724854 未加载