Game Network API

Started by
11 comments, last by Spoonbender 17 years, 6 months ago
Quote:Do you think having different ports for different types of communication would be a bad or good design choice?


I think that's a bad idea, for two reasons:

1) You want to make it as easy as possible for people behind firewalls to host serevrs. Forwarding more than one port is annoying.

2) There is per-packet overhead of the IP and UDP headers (28 bytes), as well as your own framing, and the low-level framing. You really want to pack as much data as you can into each packet, and schedule packets at a regular rate of X times per second. Combining all data into a single packet, you can put a single packet sequence number in the packet header, and use this for both timing and reliable determination.
enum Bool { True, False, FileNotFound };
Advertisement
Thanks for the reply hplus.
One would not worry me too much, but Two is a very good reason why not to do this.
That's funny, to me, #1 is absolutely goddamn critical, and #2? Bleh, doesn't everyone have reasonably fast connections these days? Of course, no one wants unneccesary overhead, but I could certainly live with this.

Also, another really handy feature:
NAT punch-through

[smile]

This topic is closed to new replies.

Advertisement