Re:Show HN: An online 2D MMO game, written in Rust and JavaS...
by Kiro on Thursday August 15, 2024 @04:18AM
(#41254019)
I thought MMORPGs preferred TCP.
[ Parent
| on HN ]
Re:Show HN: An online 2D MMO game, written in Rust and JavaS...
by Chabsff on Thursday August 15, 2024 @03:52PM
(#41259723)
You typically want a mix of UDP and TCP (or sometimes a weird TCP-like monstrosity rebuilt on top of UDP).
Taking great care to design your data streams to be self-correcting (e.g. transfer a world location where characters are going towards instead of which direction they are heading) can go a long way towards saving a ton of synching headaches, and enables very efficient networking.
One-off events go over the TCP-like channel, but constant streaming data that naturally self-correct over time, like the example above, can benefit from being on the UDP channel.