I am Sapo, Crusher of Bugs!

Published July 01, 2006
Advertisement
Hey everyone!

Boy, do I have some good bug hunt stories for you guys today, along with some neat new screens showing off some cool new features I added.

The Great Bug Hunt!
So yesterday night, I was pretty pissed off, because a couple really annoying bugs appeared out of nowhere, with no probable cause in sight. Last night I was really working to get the Light AAA functional to the point where they could fight and would die if shot too much. So I decide to add a flak unit to the level that the game loads on startup, so that I wouldn't have to add one everytime I wanted to test the system (remember this step, its the source of the bug). Anyways, I did some other stuff before I actually started playing the new level. Well, all of a sudden, 2 weapons are being spawned everytime I shoot... WTF I think to myself, I didn't even touch the weapons code. So I sit for about an hour messing with the code and trying to figure out why the hell 2 weapons are firing whenever I shoot. I even hardcoded the airplane to only be able to shoot once, but 2 things kept getting fired. I was convinced I wasn't clearing the "stuff to spawn" queue, and the same thing was getting spawned more than once. Turns out, it had nothing to do with the weapons, it had to do with.... me saving the level, read on... Well, eventually I got pissed off and started flying around and blowing shit up, then I noticed that the plane looked wierd.. no wait! There's two planes there! And they're overlapping! Then it hit me, and I looked at the level startup code. Turns out, that a long time ago, before I added the Load/Save routines, I added a bit of code that loads up a plane when the level loads, so that I could fly around with it, because the initial level at that time didn't have a plane to load. Well, when I saved the level to keep the flak there, it saved that plane in its starting position, and when I started the game again, it loaded the new plane, and it created the hardcoded plane and placed it right over the new one, so I couldn't tell there were two planes there, and whenever I tried to fire the weapon, both planes spawned their own object. Anyways, I removed that hardcoded plane loading, and voila! fixed. If I hadn't noticed that 1 pixel offset on the airplane I would probably still be trying to figure out why the hell that damn queue wouldn't clear[grin]

Health Bars!
This was a nice little addition that helped me find the other bug that had been bothering me. Once I enable collision in the bullets, the game would crash on me about 10 seconds into the game. I disabled collision and started working on some other features (including the health bars). A few hours later I came back and reenabled collision to see if I could figure out why it kept crashing. Once I entered the game, I quickly discovered what had been happening. The bullets fired from the flak guns was colliding with the flak gun itself, and would damage the flak. After about 5 seconds of firing, the flak would eventually kill itself, and effectively delete itself. This is all good if everything is happening the way it should, but in this case, the bullet still had some work to do, and it's collision reference, had become a null pointer.. .CRASH!!!! Anyways, I added an allegiance system to the objects, which stops objects of the same "allegiance" from damaging eachother.

Explosions
This was a quick addition that took about 10 minutes, but adds quite a bit of coolness to the game. Now, instead of just flaming chunks of debris, an explosion animation is played as well, resulting in a much more gratifying experience for the exploder (but not so much for the explodee). Anyways, you guys can see the explosions and the health bars in the screen below:



Anyways, I'm feeling a bit more on-track now that I've solved those bugs, so I'm still hoping to have a demo out soon, but until then, you'll have to imagine[wink] Peace Out!
Previous Entry ......
Next Entry Moovee!!!!!
0 likes 6 comments

Comments

Samsonite
Congrats to you [smile].
July 01, 2006 05:10 AM
HopeDagger
Looks great. We'll definitely need a video for some of this action. (Or a playable demo)

Teh Radar is uber, too! [smile]
July 01, 2006 12:45 PM
Sir Sapo
Thanks, hopefully I can throw a video together for tonight, as I don't work until midnight today!
July 01, 2006 01:23 PM
Rob Loach
Yay video!!!! Yay Sopwith!!!! [wink]
July 01, 2006 03:08 PM
Sir Sapo
Old Game Mechanics FTW!
July 01, 2006 09:52 PM
Knarkles
Looks cool. ...but I would just throw the health bars away, IMO they don't fit the graphical style. You could always have damaged graphics for flaks too instead of health bars? :)
July 04, 2006 12:39 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!

1181 views

'Roids

1488 views

Post Dva

1270 views

Untitled

1105 views

I'm a sad panda...

2115 views

Untitled

1009 views

Progress

1053 views

Angels 2X!!!!!

1475 views

T3H Progress!

1299 views

ZOMG!!!!

1179 views
Advertisement