17-11-2006, 08:46 AM
Binary packets are a pain in the butt, yes, but it is going to slow you down a LOT if you don't use it in the long run. Think, now, what you plan to accomplish. If you expect to get 50+ players on at once, then you should use binary packets to prevent lag since you can decrease the size of packet information (not packets) by quite a lot (300%-800% typically about is what I found when looking at Kronia's code, which uses Mirage). If you do that, though, you will also want to add in packet buffering. Keep in mind TCP/IP packets have an overhead of about 55 bytes. If you send data as fast as you can, you will kill yourself with overhead bandwidth. Nagling is enabled in Winsock Control by default (unable to turn it off, too), which is a very poor way to buffer and NOT recommended for games (can I elaborate if you wish). How long you buffer is up to you - flush the buffer after every server loop by default in vbGORE, just since the extra bandwidth isn't needed until theres a lot more connections so it is best to give the speed for the cost of bandwidth. It is very easy to extend the time you buffer, though.