Game Development Reference
In-Depth Information
'
worse than the original problem. It
s best to perform these checks often and through-
out the life of your project.
Nu-Mega
s BoundsChecker and Runtime Analyzers
BoundsChecker is a great program, and every team should have at least one copy. In
some configurations, it can run so slowly that your game will take three hours to
display a single screen. Rather, use a targeted approach and filter out as many checks
as you can and leave only the checks that will trap your problem.
'
Disappearing Bugs
The really nasty bug seems to actually possess intelligence, as well as awareness of
itself and your attempts to destroy it. Just as you get close, the bug changes, and it
can ' t be reproduced using your previously observed steps. It ' s likely that recent
changes such as adding checking code have altered the memory map of your process.
The bug might be corrupting memory that is simply unused. This is where your
notes will really come in handy. It
s time to backtrack, remove your recent changes
one at a time, and repeat until the bug reappears. Begin again, but try a different
approach in the hopes you can get closer.
'
Bugs Fixing Themselves?
Another version of the disappearing bug is one where a known failure simply
disappears without any programmer actually addressing it. The bug might have
been related to another issue that someone fixed
you hope. The safest thing to
do is to analyze recent changes and attempt to perform an autopsy of sorts.
Given the recent fixes, you might even be able to re-create the original
conditions and code that made the bug happen, apply the fix again, and prove
beyond a shadow of a doubt that a particular fix addressed more than one bug.
What
s more likely is that the number of changes to the code will
preclude the possibility of this examination, especially on a large team. Then you have
a decision to make: Is the bug severe enough to justify a targeted search through all
the changes to prove the bug is truly fixed? It depends on the seriousness of the bug.
'
Tweaking Values
A classic problem in programming is getting a constant value just right. This is
usually the case for things such as the placement of a user interface object like a but-
ton or perhaps the velocity value of a particle stream. While you are experimenting
with the value, put it in a static variable in your code:
void MyWeirdFountain::Update()
{
 
 
 
 
 
Search WWH ::




Custom Search