- 新しい順
- 投票が多い順
- コメントが多い順
No, RTS doesn't use Reliable UDP. It uses dgram
provided by NodeJS (https://nodejs.org/api/dgram.html).
Could you help me understand your use case for this? Do you have any data to show that TCP or UDP are insufficient for what you are trying to do? With these info, I can work with the product team and send in a feature request.
Well, any genre that is latency-sensitive. For example, the real-time strategy genre.
I'm from a Unity background that almost every popular network solutions offer RUDP as the preferred network protocol. I'd like to borrow the concept of Ruffles (a reliable UDP library of Unity):
- Reliable : All messages are guaranteed to be delivered, the order is not guaranteed, duplicates are dropped. Uses a fixed sliding window.
- ReliableSequenced : All messages are guaranteed to be delivered with the order also being guaranteed, duplicates are dropped. Uses a fixed sliding window.
- Unreliable : Delivery is not guaranteed, nor is the order. Duplicates are dropped.
- UnreliableSequenced : Delivery is not guaranteed but the order is. Older packets and duplicate packets are dropped.
The most useful one is the first "reliable" type.
The problem is RUDP is just a layer on top of UDP. So there's no gold standard or dominated cross-platform solution there.
Thanks for the details @REDACTEDUSER
Currently we are using DTLS to provide encryption in-flight over UDP. Do you know if RUDP has something similar? Could you recommend some popular RUDP libraries that are tried-and-true? Could you also share examples of your aforementioned network solutions which use RUDP?
GLIFT-15961
Low-level RUDP Libraries
Name | Language | Encryption |
---|---|---|
Ruffles | C# | n/a |
LiteNetLib | C# | AES or XOR |
Lidgren.Network | C# | AES |
Hazel-Networking fork | C# | DTLS |
ENet | C | n/a |
ENet-CSharp | C# | n/a |
KCP | C | n/a |
Ruffles - https://github.com/MidLevel/Ruffles
LiteNetLib - https://github.com/RevenantX/LiteNetLib
Lidgren.Network (maintain mode) - https://github.com/lidgren/lidgren-network-gen3
Hazel-Networking (fork) - https://github.com/willardf/Hazel-Networking
ENet - https://github.com/lsalzman/enet
ENet-CSharp - https://github.com/nxrighthere/ENet-CSharp
KCP
- https://github.com/skywind3000/kcp/blob/master/README.en.md
- https://github.com/vis2k/kcp2k/ (C# port)
- https://github.com/leenjewel/node-kcp (node wrapper)
High-Level Network Solution that supports RUDP
Name | RUDP | RUDP Library |
---|---|---|
MLAPI | Y | via Ruffles |
UNET/Mirror Networking | Y | via Ignorance (an ENet wrapper) |
DarkRift 2 | non-official | via EnetListener |
Photon | Y | adopt from an early version of ENet |
Well, asymmetric cryptography is not the focus of these RUDP libraries, very few implemented DTLS.
For reputation
- ENET is the well-used one but lacks documentation.
- KCP seems promising in the Chinese community.
- Hazel-Networking (fork) is maintained by the author of Among Us (and the game uses it).
Thanks for the detailed list! Those are definitely convincing.
If we pull in this feature, we would probably add one of the C# libraries in the C# RTS client; however, on the server side, we'd have to use NodeJS. It's shame that there is no widely used or actively maintained RUDP NodeJS library as far as I see. I found these 2: https://github.com/shovon/node-rudp, https://github.com/Raulmsm/RUDP. The former is slightly more promising and could be looked into.
Last question that could help greatly in prioritization, is there any research that shows concrete numbers on how much improvements RUDP brings over UDP and TCP, e.g. in areas like throughput / packet loss rate? (No big deal if you don't know, we'll do this research ourselves, but it seems like you are an expert in this so doesn't hurt to ask :) )
For benchmark
- [The author @REDACTEDUSER
- Benchmark for ENet and KCP https://paytonturnage.com/writing/latency-of-reliable-streams/
- Another benchmark for ENet and KCP https://github.com/libinzhangyuan/reliable_udp_bench_mark/blob/master/bench_mark.md
- Reliable User Datagram Protocol as a Solution to Latencies in Network Games - compare TCP, UDP, and RUDP
For cross-platform, since RUDP is just a custom layer on top of UDP, different implementations are not compatible with each other. To get a cross-platform solution you may have to port one implementation to node, vice versa.
- ENET is written in C, so it can be used anywhere with a wrapper layer.
- node wrapper: https://gitlab.com/dacevedo/enet-js
- KCP is also written in C and has both C# port and node wrapper.
- Another idea is to use edge.js to integrate .NET DLL with node, then both server and client can stick with the same managed .NET solution.
Not really an expert, hope this information help.
Actually there is a RUDP lib for Nodejs. Please check out geckos.io: https://github.com/geckosio/geckos.io
From the Geckosio page: Version 2 has huge performance improvements. I switched from wrtc to node-datachannel, which is much lighter and faster compared to wrtc.
I think GameLift Realtime Server is looking for a cross-platform solution.
関連するコンテンツ
- AWS公式更新しました 2年前
- AWS公式更新しました 10ヶ月前