Why programming is sometimes hard
Friday, 18 July 2014
I fixed some networking issues in our engine (specifically Drox Operative) a while back and the path I had to take to find the solution was interesting, so I thought I would write up a little of what happened.

The problem was that once a game progressed long enough, people were having a hard time joining the server hosting that particular sector. Easy enough, I thought, but no matter what I did I couldn't reproduce the problem. I even got some of our gamers to send me their save games that they were having trouble with, but still no luck.

Even though I couldn't reproduce the problem, I looked at the save games to see if there was anything interesting going on. What I found was one of the initial networking messages was so large that the networking system needed to create over 10 fragments for it (the system would send 10+ smaller messages). At the time, the system would throw out the entire message if it received an out of order fragment or any fragment got lost. I figured if the packet loss was very high, a message of that size would almost never get through. So I set my handy packet loss tool to drop 50% of the packets and sure enough, I could almost never get that message through.

So I go about making the system smarter about fragments. I made it so it would store all of the fragments and if it missed a fragment or got an out of order fragment, everything was fine and it would just wait for the other side to resend the message again. As long as the next message was the same as the first, it would ignore repeated fragments and just use the fragments it needed. This way sooner or later, even with bad packet loss, it will get all of the fragments.

So now everything should work great. I test it and the new stuff does exactly what it should, but it still doesn't work. Even weirder is I turn the packet loss tool off and it still doesn't work even though it used to when the tool was off. At least now I have a reproducible situation.

I debug the problem and see that it gets each fragment fine until a little after 8192 bytes. It wasn't exactly 8192, but it was near enough to that power of 2 that I was suspicious. I turned the packet loss stuff back on and now I started getting data after 8192 bytes but I noticed that I was getting the same number of fragments through each time. So the networking was only delivering a certain number of bytes before eating everything else. I did a little googling and found out that Windows defaults to a 8192 buffer size for incoming UDP packets.

Ok, so I've found the problem. I found the correct commands and now the networking is told to use a much larger buffer so it can at least hold one large message. I test again and it still doesn't work! :( I start debugging again. Now I see fragments coming through way past 8192, so that is fixed, but I get to around 32K and then one of the numbers goes negative. Again that sounds like another power of 2. In this case it sounds like a signed 16 bit value. Sure enough I find that fragments are using a signed 16 bit for an offset number. Again easy enough, I change it to a 32 bit value so that should never be a problem again, assuming we never generate messages that are over 2GB in size. :)

I test again and things finally work as they should! So in the end, my initial packet loss changes had nothing to do with the real problem that we were running into. The fixes to the actual problem were like 2 lines of code compared to probably 100s dealing with the packet loss. However, it still is a nice change because it handles packet loss much better on large messages. I'm still not quite sure why I couldn't reproduce the problem in the first place though.


Wednesday, 09 July 2014
It occurred to me the other day that our upcoming zombie game will be our 3rd game to have some kind of clans, however each one works very differently.

We have covenants in Depths of Peril. These covenants are in a direct competition to become leaders of their town. Barbarians essentially "elect" their leaders through combat to the death. You have to deal with the other covenants in order to win. They are a constant threat, especially since they are based in the same town and can raid your house at a moments notice.

The races in Drox Operative work like clans, but the player isn't really part of any of them. The player is a freelance Operative that works between the races. The races war, trade, and in general fight to control the galaxy, but the player isn't in the direct line of fire. Although it is very easy to get sucked into the conflicts.

In our upcoming Zombie game, the player again controls their own clan. There are other clans in the world, but unlike DoP, the other clans aren't direct competition for you. You don't have to destroy or ally with them to win. That doesn't mean that you can ignore them though. There are a finite amount of resources easily available and you just might be an easy target or they just might not like you very much.


Zombie game monsters
Tuesday, 03 June 2014
I've been pulling over monsters from previous games to the new game recently. Most of them showed up in Din's Curse, but a few of them haven't made an appearance since Depths of Peril because we haven't had any outdoors since then. Not counting zombies, which monsters from our previous games would you really like to see in the new game?


Game 5
Wednesday, 30 April 2014
We've started initial work on game 5 now. For our first few games we kept things quiet until we were ready to officially announce things, but that was a pain and not very fun, so we are going to start talking about the game now. Don't take anything we say as a guarantee though. It is still very early, so anything could change.

Here's my very current, rough blurb:

In the DoP/DC world, the zombie infection has mutated and is out of control. Now anything bitten or even scratched by a zombie might be infected. With the easy spread of the zombie infection, the undead are overrunning most of the world. Civilization has been destroyed. There are still pockets of resistance here and there; many of these are not human though.

Your job is to ensure you and your followers survive the zombie apocalypse. While zombies are the most immediate threat, it's not the only one. Critical supplies like food are extremely limited and must be provided or people will starve. Your followers can be infected. Having someone turn inside of your stronghold is bad. Other groups are struggling to survive also. When they run low on supplies, will they trade or attack? Other groups, monsters, and zombies can all attack your stronghold. And finally you have to make sure your followers don't cause problems or kill each other.

While not usually life threatening, you must deal with your followers. Their moods, personalities, actions, and skills will affect everyone else in your stronghold. Someone that is upset might drag down everyone's mood or might even start a rebellion. People with opposite personalities might get into fights and cause a schism within your stronghold. Someone saving another follower from a zombie might make them a friend though. Having followers with key skills will be important. You might need someone with the blacksmith skill to repair weapons. Having a butcher might increase how much food you can scavenger from a killed animal.

This is a game of survival. When a follower dies, they are dead. The world supply chain is gone. Food is a critical resource that must be obtained. Vendors are rare and have limited supplies. There isn't a town blacksmith that can repair all of your weapons or a town vendor to buy an infinite amount of food from. Survival isn't easy.

End of very rough blurb

Just to be clear, this is a zombie survival game set in the DoP/DC universe. It is in a fantasy setting and will use an isometric viewpoint. While it's not really a true sequel, it will have lots of elements from DoP, DC, and even Drox.

I know there's probably too many zombie games, movies, TV shows, and books out right now, but I like zombies. :) If you haven't noticed, every game we've done has had zombies in it, even Drox.

Anyways, as usual we would love your feedback. Questions, ideas, and criticisms are all welcome.


Last 2 weeks
Wednesday, 18 December 2013

I wanted to apologize to everyone that has emailed me, posted questions, posted for the first time on the forums and waiting for moderation, or was waiting on Drox fixes for the past couple of weeks. I had a very good reason, but I'm still sorry that I disappeared on everyone for that long. I'm back to work now though and and I'm slowly catching up on things.

So here's the short version of the story: on December 4th, my wife Delilah had an emergency pregnancy related complication and spent 10 days in the hospital. It was scary the first few days and I spent most of those 10 days in the hospital, but everyone is home now and doing pretty good. Delilah is going to get stir crazy because she is suppose to take things easy for a while, but she should be fine. Also our 2 week old girl is doing great. She was 3 1/2 weeks early, but she was apparently ready to be out and keeping us up at night. :)

So other than some recovery time and much less sleep than usual, things should be returning somewhat back to normal.


<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 19 - 27 of 233


Sign up for our free newsletter!