The Link-Dead network code is probably the toughest thing I’ve ever programmed. The concept is amazingly simple (check out John Carmack’s Quake 3 snapshot model) but coding it is a different story. Because of its 100% reliable nature it is extremely prone to human code error. For example the Soldat netcode could go through a lightning and nuclear storm and it would still work (maybe the occasional team switch bug but it would keep on going). This is actually the first time in my career that I decided to use the test-driven programming model to catch out bugs at the coding phase. Wish me luck.
Posts from March 2009
Since we decided not to publish any game content until it is nearly finished I made a mod. This is the first ever full modification for Link-Dead. Some of the effects don’t work here 100% cause the graphics weren’t really meant to be normal mapped and shadowed; also I didn’t spend much time on the animations. Anyway enjoy.
I encountered some performance issues while stress testing the game. Both with Box2D physics and the new pixel shaders. Is normal mapping really this slow? Also the ragdoll isn’t the fastest thing, don’t know what’s up. I made the whole system faster by scaling the world down. It seems physics engine perform better in the scale of 0.0f-10.0f instead of real world values. Nevertheless ragdolls are a bit slow. It’s either their complexity or collision performance. I guess the latter cause a ragdoll shouldn’t be that slow.
Can’t fix that bug. It’s related to reliable packets. Maybe later, on LAN it works correctly so I just moved on to other things.
At least we fixed the weapon bug in Soldat (with help from Shoozza and Sable).
I made deaths and ragdolls work over network. So technically you can run around, kill guys, respawn. It’s a working game!
I also brought back the old wall paint code. Made some blood on body shot painting with it of course.
I’m struggling with one annoying network bug for a few days. Net bugs are hardest to catch. I’m doing the same in Soldat now, so it’s double frustrating. Nothing more to say from me. Sigvatr is making tons of tilesets for the mapmaker.
I’m battling with the netcode. It works and doesn’t work. It’s the most difficult thing I’m doing, my brain hurts from thinking about it. I feel like a network simulator in my head constantly playing it in my thoughts.
The network code will be 100% reliable and from the tests I’m doing it seems that it is going to be really smooth. I have a little program that helps me with this.
I wish I had this when I programmed and tested Soldat net code : QoS
Amazing times for making games nowadays. It seems like we’re inventing some cool stuff everyday for the game now. Today we came up with a method of making 3 effects from just 1 file. Not only for backgrounds but for all sprites in the game.
The effects are:
- normal mapping
- specular highlighting
The last one is new. It is a graphical area that is not affected by shadows. In simpler words it is stuff that glows, like little lights. For example eyes of an infrared helmet.
Graphically this game is looking astounding. What really excites me is that this is not the end cause we just started thinking about particle effects (like smoke and fire). So that will come next.
Also I managed to get network code working today. It was a tough battle but I made it. Looking at it again there are some problems with it and I need to reprogram it a bit. I made too much deviations from the original idea by Carmack. Its best to stick to the genius.
As a reminder my post about the netcode: Pump your state!
Today I made complete collisions for bullets. Now they pass through platforms and stairs unless they are shot at. This means if you mouse aim before a platform, you will shoot at the platform. If you aim further it shoots further.
I made colorizing/saturation and blur filter as a postprocessing effect. I think Link-Dead will use heavily this kind of stuff. Think Saving Private Ryan.
I started working again on netcode cause it broke after switching physics engines. I have to fix it and make the game work over network again so we have a walking shooting multiplayer game!