“How long a minute is, depends on which side of the bathroom door you’re on.”
-Zall’s Second Law
You know the feeling of spending way too much time on a task and you just know the problem is the result of something really, really, really dumb? I do. I know that feeling well.
The past few weeks (ok, maybe it has been a couple/three months on and off all said) I have been trying to track down some jitter in the network system. Whenever a major event happened (like a new player connecting or sometimes when a weapon was spawned) the game would sorta lock up for about a half second. I spent a lot of time trying to understand this problem. I created many graphs plotting every network event, how long it took, when it happened, what type of event, etc. I created a test program to make sure the problem wasn’t in the networking library we are using. I queued up data on the sending and receiving end and tried to prevent too much data from being processed at once. I even did a code dance (Yes, this is like a rain dance but for code, duh. It looks like this).
So you can certainly imagine my shock to notice this line of code yesterday night at 6:10pm:
if (GetNetEvent())Yeah, exactly. What was I thinking?!?!?!?!???!?!?!? This should OBVIOUSLY be:
while (GetNetEvent())Anyone can see that just walking down the street (well, I couldn’t until last night, but anyone else could). In a nutshell (do all nuts have a shell?), network events were only being checked once a tick. So my code to queue up certain events was never really working. In a different nutshell, sometimes it takes a lot of time and a lot of effort to realize you made a really, really, really dumb mistake. That’s the way she goes.
Last week I spent the majority of the time re-working some of our race maps. After fine tuning our boost-giving mechanisms I had to add and move around some of the checkpoints in the map, as well as adding / moving some of the item boxes. We have been play testing every day which really helps highlight little things in the tracks that need to be tweaked. I also worked on a bunch of miscellaneous little art and gui tasks, creating a few new GUIs and item and gameplay graphics.
This week will hopefully be more playtesting and more little tweaks and additions.
Lots of progress with the NimbleCrew bunched together in our San Diego office last week! One cool feature I was able to implement in Zero Gear last week was the ability to add guiding forces to certain weapons to increase their effectiveness. You will no longer need extreme pin-point accuracy to ice or blow up other players. I also added a spectator mode which lets you watch others race when waiting for a new round to start.
Yesterday I labored to create a new weapon - the Repulsor Shield, which pushes all physical objects away from the player while active. The Repulsor can work as both an offensive and defensive weapon if used correctly! Also added was a new GUI element in Tag mode showing how close to winning the IT player is. This week I’ll be adding a graphical draft effect, fixing some race mode bugs, and whatever else comes up.













Murphy we have all done it but you are the only one that admits it
Maybe it is time to get some cuddly friends.
Seriously with the help of eeen and borrowing from the scrum camp this could/might have been easier to find. I am referring to teaming up and inspecting coding in pairs. It is something like when you have a problem and it is not until you explain it to somebody who does not know the details that suddenly the light bulb comes on, Ding .
Actually I once read an article (may have been on Gamasutra) where a game studio issued teddy bears to all there developers which they have to explain there problems to
Keep up the good work guys.
@Murphy; That’s just the way she goes!
I talk about these types of problems with friends a lot (they probably get sick of hearing about it). This was just such a small part of code that was working properly in the past. At some point I switched it for some reason and didn’t notice till now. I never even considered it wasn’t working properly until I was working in the function last night. If anything I wish I had some tests for this code.
I have a couple of cats I sometimes explain programming puzzles to but they mostly just fall asleep halfway through. I don’t even think they are interested in programming.
For all future problems, just change all your if’s to while’s and you should be fine
Thanks for the advice Danny. I just did a global find/replace. I can’t imagine what could go wrong so I’ll just assume it is fine.
Just glad I could help out in some small way. Now that I solved all your remaining issues, should be ready to ship, right?
As long as it compiles I think we should be set for an early release.