Game Development Reference
In-Depth Information
headroom when your game initializes. If any consumable is in short supply, you should
bail right there or at least warn players that they won ' tbeabletosavegames.
Nine Disks Is Way Too Many
In the final days of Ultima VIII, it took nine floppy disks to hold all of the
install files. Origin execs had a hard limit on eight floppy disks, and we had
to find some way of compressing what we had into one less disk. It made
sense to concentrate on the largest file, SHAPES.FLX, which held all of the
graphics for the game.
Zack, one of Origin
s best programmers, came up with a great idea. The
SHAPES.FLX file essentially held filmstrip animations for all the characters in
Ultima VIII, and each frame was only slightly different from the previous
frame. Before the install program compressed SHAPES.FLX, Zack wrote a
program to delta-compress all of the animations. Each frame stored only the
pixels that changed from the previous frame, and the blank space left over was
run-length encoded. The whole shebang was compressed with a general
compression algorithm for the install program.
'
It didn
s for sure, but Zack saved Origin a few tens of thousands of
dollars with a little less than a week of hard-core programming.
'
t make installation any faster, that
'
Release Mode-only Bugs
If you ever have a bug in the release build that doesn
'
t happen in the debug build,
most likely you have an uninitialized variable somewhere. The best way to find this
type of bug is to use a runtime analyzer like BoundsChecker.
Another source of this problem can be a compiler problem, in that certain optimiza-
tion settings or other project settings are causing bugs. If you suspect this, one possi-
bility is to start changing the project settings one by one to look more like the debug
build until the bug disappears. Once you have the exact setting that causes the bug,
you may get some intuition about where to look next.
Multithreading Gone Bad
Multithreaded bugs are really nasty because they can be nigh impossible to reproduce
accurately. The first clue that you may have a multithreaded issue is by a bug
s
unpredictable behavior. If you think you have a multithreaded bug on your hands,
the first thing you should do is disable multithreading and try to reproduce the bug.
A good example of a classic multithreaded bug is a sound system crash. The sound
system in most games runs in a separate thread, grabbing sound bits from the game
every now and then as it needs them. It
'
s these communication points where two
threads need to synch up and communicate that most multithreading bugs occur.
'
 
 
 
Search WWH ::




Custom Search