I’m working on a reusable network layer for java games, and I have some questions about UDP. TCP/IP support is finished, and now I’m just trying to design the UDP support before I start coding it.
I read that you shouldn’t send UDP packets that contain small amounts of data in the “The Internet Sucks” article at:
http://www.gamasutra.com/features/19990903/lincroft_01.htm
because of uncompressed packet headers. But that seems doesn’t sound right… It seems like with many real-time multiplayer games, ‘streaming’ data is required. Data consisting of small packets containing actions the other player(s) have taken, some sort of GameState, etc… Whatever the method of updating the other player(s), the updates usually need to be quite frequent. Any thoughts on his comment?
Also, I’m trying to design a method to ensure the arrival of packets when using UDP. The only way I can think of is to send a response back when a packet is received. But then you don’t know if that response packet was received, therefore the response itself would require a response, and that response would require a response, and so on. Also, this seems like it would create quite a bit of network latency.
Here’s my project if you want to check it out:
http://gaming.cyntaks.com/projects/viewproject.php?project=RJNL
Breadstick