View Full Version : Kivi networking update

01-16-2009, 09:24 AM
So yesterday I finally got a chance to work on some networking code. Luckily I planned a little bit ahead and the engine already uses a client/server architecture and passes messages back and forth, so there is a good foundation to build multiplayer on.

Well even with no real testing on the network code before yesterday, I now have at least some minimal multiplayer working. I now can have 2 (probably more) players running around on the same map killing things. There is still lots to do to get it working well or even correctly, but it's a nice start.

One of the cool things is the Mac networking works even though it has never been tested at all. All I did for the networking when I ported Depths of Peril over was to simply get it to compile correctly. I didn't need to do anything further because, until now, neither game actually used any of the networking code even though it was there.

As a side note, I did run into a bug because someone had the receiving message buffer hardcoded to 2000 bytes. It kind of has to be a fixed length because of the external api it has to call, but really, only 2000 bytes? Who on earth thought 2000 bytes was ever going to be big enough? Sigh. Too bad there aren't actually any other programmers but myself to blame. :)