The Allegro Wiki is migrating to github at

Zoidcom - High level networking

From Allegro Wiki
Jump to: navigation, search
This article is incomplete and needs some revision or has some pending TODOs. Please help Allegro by editing and finishing it. When the article becomes complete, you may remove this tag.


Hello Pixelate readers. I am a fellow reader and member of the Pixelate community, but this is my first article here. It's my first article ever actually, so any feedback is greatly appreciated.

Now on to the topic, networking, high level networking, Zoidcom?
Let me begin with my own experience in network coding. I have tried out several low level libs like libnet, hawk-NL and the like where I just did a chat and then gave up. I always came to the same conclusion, the network code for games needs tons of safety checks and synching and so on, and I don't feel like solving all the problems such an adventure would give me.

Then I found Zoidcom, or rather, Zoidcom found me. Jörg Rüppel, the creator of Zoidcom, made an announcement on when he released the first beta and I went to check it out. I read the introduction on his site and was amazed, this library had it all solved for me. All you have to do to make a networked game is to tell Zoidcom what to replicate, so simple it feels like cheating. Interested yet? Zoidcom's website is here -

I should also mention that I have tried other high level networking libs, but I can't remember the names of them now. The problem I had with them was their restrictions, one had a maximum client limit for instance. Zoidcom is a restrictionfree lib, and Jörg is a very nice guy.

Using Zoidcom

So, what happens next? I downloaded Zoidcom and took a closer look. Reading the docs was actually a bit frightening, there was so much of it and some of the functionality I couldn't quite understand. But after a while I had digested this shock and put together a test project to see if it actually worked. The first thing I want to mention about using Zoidcom is that you only need to link to Zoidcom. Libnet requires you to link in winsock, and hawkNL needs threads etc.

The first thing I do is a chat, as always when I try out a new networking lib. This was pretty troublesome, at first I couldn't even figure out how to do it. I mentioned my problem on the forum, and Jörgs answer was very simple.
Then I did my programming and got a program that worked. Once I got the chat working I added a player object to move on the screen. Well, there's not much to say about that, I just added it, no problem.

My conclusion is that the hardest part when making a game with Zoidcom is the chat system. Ofcourse there are other things that are harder, but nothing that concerns Zoidcom. The rest is just a matter of adding and removing game objects which is very simple.

Zoidcom almighty? No

You might think that I think Zoidcom is the best lib for every networking situation, that's not the case. I think Zoidcom is great for real-time games. But if you want to make a turn based game or a chat client Zoidcom is like using a Jumbojet to go downstairs. In these cases I recommend libnet or hawkNL, you don't need any of the features Zoidcom offers.

Closing words

The announcement for Zoidcoms release on was made quite a while ago, and a productive person would have a nice little demo attached to this article. I would really like to have a nice little demo for you, but I don't. But I hope that I've spawned some interest in Zoidcom with this little article, and that you will visit the Zoidcom forum some day.

Anders Andersson is a handsome young man who has read all of the thinking indie articles in Pixelate and love them. Visit his useless website and have a laugh, "or do something usefull with your time".

TODO: Add code examples and example game (edit)