
Dirty Game Development Tricks - dsirijus
http://www.gamasutra.com/view/feature/194772/dirty_game_development_tricks.php
======
frooxie
The best one I've heard of, from Ken Demarest:

Back on Wing Commander 1 we were getting an exception from our EMM386 memory
manager when we exited the game. We'd clear the screen and a single line would
print out, something like "EMM386 Memory manager error. Blah blah blah." We
had to ship ASAP. So I hex edited the error in the memory manager itself to
read "Thank you for playing Wing Commander."

~~~
Bjoern
As a big Wing Commander fan this made my day! Thanks..

------
chiph
On the last page:

 _HR hacks -- Ben Burbank -- When I used to work for a very big company, one
of the employees figured out that the best way to advance his career was to
write negative performance reviews for as many co-workers as possible. This
resulted in him receiving a higher annual staff ranking, which in turn led to
larger bonuses and stock grants. It eventually becomes difficult, he told me,
because you need to make sure to only review people with different managers,
so nobody can catch on to your ruse. My trick for avoiding this cycle was to
quit and go work someplace much smaller and awesome_

Wow. Just wow. So far I have avoided working anywhere with a culture that
evil.

~~~
soult
See also: "The Cool Cam"[1] on The Daily WTF.

1: [http://thedailywtf.com/Articles/Classic-WTF-The-Cool-
Cam.asp...](http://thedailywtf.com/Articles/Classic-WTF-The-Cool-Cam.aspx)

~~~
notjustanymike
Loved that article. I work as a UI developer, and sometimes it helps to
remember that story. A couple CSS3 animations here and there always liven up a
boring presentation of new features.

------
jmduke
My favorite little trick of these was that the bushes and the clouds in Super
Mario Bros. were the same shape (presumably to save space):
[http://www.todayifoundout.com/index.php/2010/01/the-
clouds-a...](http://www.todayifoundout.com/index.php/2010/01/the-clouds-and-
bushes-in-super-mario-bros-are-the-same/)

I would _never_ want to enter the game development industry but I would love
to shadow them for a few weeks. It sounds like a culture of required
innovation (and, you know, eternal crunch time).

~~~
ANTSANTS
That's a little different from the tricks described in the article, though:
Not a last-minute hack, but a deliberate space compromise of the kind that
these games absolutely were built around.

Ever notice that a lot of old games have very repetitive worlds? Most of them
are built around what some call a "room sprite": a prefabricated room that can
be placed anywhere in the world. The world, then, is not much more than a big
array of of indices into an array of expensive room sprites.

That's relatively straightforward, but it gets interesting when you store some
information about an instance of a room separately from the "sprite" itself.
Simplest example: If you store the hardware color palette and/or tilemap
information separately, you can use the same basic room in different dungeons
and make it look significantly different each time.

If a game has a generic "item room" (like the ones in Metroid or Zelda), you
can bet that each instance of that room only needs to specify a single byte
representing the item to be found in it.

A more interesting application are the doors in Zelda: They're not a part of
the "room sprite" itself. Instead, for each possible north, south, east, and
west door, there's a simple bitflag that enumerates a few possibilities: "no
door on this wall, there is an open door, there is a locked door, there is a
door that you must trigger an event to open, etc."

I don't know if Zelda does this, but it would be pretty easy to allow rooms to
be flipped horizontally or vertically as well.

Just these few techniques, a dozen rooms, and thoughtful game design would
probably be enough to get a few decent dungeons that would take hours to beat,
out of a modicum of kilobytes.

My favorite example of this idea: If you really explore the original Metroid,
you'll find a lot of hidden bombable paths that don't always lead anywhere.
For instance, all item rooms have a pipe underneath them that can be entered
by bombing a nearby block, but in most of the rooms, the pipe doesn't lead
anywhere. If you don't know any better, it seems like the designers are just
playing with your curiosity. In hindsight, it's totally obvious that this was
a trick to let the game designers choose whether or not to put a secret
passageway behind a particular item room just by lining up a different room
next to it!

Once you get this, you see it everywhere in the world. You start recognizing
different room sprites, and memorize the where their hidden paths are located.
With that and the realization that the game only ever scrolls along one axis
at a time, the seemingly impossible task of mapping out the entire world ("do
they really expect me to shoot every single wall?") quickly becomes a simple
effort of pattern memorization. Sadly, most people who try the original
Metroid today get tired of climbing up those long vertical shafts and starting
with only 30 health and quit before they even get a chance to discover this
metagame.

~~~
danielweber
I never heard the bomb-pipe strategy described that way. I figured they were
just prepping you for that One Very Special Room where it actually did
something.

Once you realize that long corridors in Metroid are just integers representing
the same room repeated, it makes a lot more sense.

------
SeanDav
I love the idea of the developer causing a buffer over-run to patch their own
game. Does kind of make one wonder what other dragons lurk in that particular
code set.

~~~
dclowd9901
Seems like a hacker could exploit that to bootstrap in a loader.

------
hcarvalhoalves
Looks like many of these tricks steems directly from the lack of good
debugging tools (paired with tight deadlines). Is console game development
really that bad? The guy debugging with colored screens is a real WTF.

~~~
munificent
> Is console game development really that bad?

Well, that story was from 11 years ago. Even then, PS2 and XBox devkits
weren't bad. Comparable to IDEs at the time, or maybe even a bit more powerful
for debugging.

> The guy debugging with colored screens is a real WTF.

That's essentially the graphics equivalent of printf() debugging. It's all
about quickly getting some insight into what's going on. If hacking some
colors in there does it, so be it.

Note that this was a bug occurring related to handling user input while
loading, so it's likely that pausing the game or stepping into a debugger
would actually prevent the bug from occurring. In situations like that, you
make do with what you can.

~~~
ANTSANTS
Seconding this, especially the bit about colored screens. Sometimes, you just
need a simple way to get some information up on the screen at a minimal cost
to runtime performance and code-complexity.

I'd find it hard to believe that anyone back in the day _didn 't_ use the
"change the color of the background by manipulating the hardware color palette
during different sections of the frame logic so you can 'see' how long each
part is taking" trick.

~~~
shabble
I'd never heard of it until I came across it mentioned/shown[2] in the
[unofficial] C-64 Prince of Persia conversion[1] linked from some HN thread
the other day.

I've done the Storage Oscilloscope + pin twiddling for profiling embedded
stuff though, and for a few short minutes, was convinced I'd invented
something brilliant. :)

[1] [http://popc64.blogspot.co.uk/2011/10/part-one-why-hell-
would...](http://popc64.blogspot.co.uk/2011/10/part-one-why-hell-would-anyone-
want-to.html)

[2] [http://popc64.blogspot.co.uk/2012/01/part-nine-
optimizations...](http://popc64.blogspot.co.uk/2012/01/part-nine-
optimizations-for-princess.html)

------
jplur
I love these kinds of anecdotes, this is one of my favorites:
[http://exile.acornarcade.com/devel.html](http://exile.acornarcade.com/devel.html)

------
maybe
Using the EULA's buffer to patch sounds very interesting.

~~~
voltagex_
It sounds like something similar to the softmod exploits used to run unsigned
code on the Wii.

------
joyeuse6701
hmm, buffer overflow exploit via the EULA to patch the game since you shipped
without the ability to patch, there's a game dev hack if I've ever heard of
one.

