Re:UDP for games – encryption and DDoS protection
by supernintendo on Thursday April 28, 2016 @12:05PM
(#11589853)
With my example for login, my assumption was that one would use short-lived TCP connections (i.e. server receives login packet, sends success/fail and finally closes the connection), not a simultaneous, persistent connection where TCP congestion (and thus UDP packet loss) becomes an issue. But maybe I'm wrong on this one.
Thanks for sharing by the way, great article (although as an aside, some of those graphs are really hard to read).
> Some game developers, when confronted with a TCP problem, think "I know, I'll add UDP." Now they have two problems.
Games that implement their own protocol over UDP typically have packet modes (frequently a "channel" akin to WebSocket channels): reliable, ordered delivery or neither or either. There is almost always the notion of a connection, where appropriate. This is the correct way to do things, and with Raknet now being free you really have no excuse to do it any other way.
For authentication you could just use the reliable/ordered channel and carry on as though you were using TCP - which somewhat defeats the purpose of this article.
[1]: https://www.isoc.org/inet97/proceedings/F3/F3_1.HTM