Gamasutra: The Art & Business of Making Gamesspacer
Dirty Game Development Tricks
View All     RSS
October 30, 2014
arrowPress Releases
October 30, 2014
PR Newswire
View All

If you enjoy reading this site, you might also want to check out these UBM Tech sites:

Dirty Game Development Tricks

June 24, 2013 Article Start Previous Page 4 of 4

...And one for good luck

Richard Morwood

I had a list of background textures, and I coded the game to show each one as they scrolled across the screen. One of my background images was being skipped and I couldn't figure out why, even after spending a lot of time debugging. Deadline was five days away, so I just stuck an extra reference to the texture in the background list. Ta-da! No more "skipped" background. :)

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.

Honorable mention: Nice save

Chris Pruett, Robot Invader

[Editor's note: This isn't, strictly speaking, a dirty game dev trick -- but we figured it's a handy way to use job skills for real-world problems. Also, it's a sweet story.]

My wife doesn't play a lot of video games, but one series she's been hooked on since childhood is Dragon Quest. A few years ago, she started playing Dragon Quest VII on my aging PlayStation. After putting about 80 hours into it (which, as I understand it, is about three-quarters of the way through the main quest), she discovered, to her horror, that her save file had become corrupted. It appeared in the continue menu, but was grayed-out and could not be selected. She was devastated. She was angry. She swore never to play games again.

I found a used DexDrive, a device for reading and writing PS1 memory cards with a PC, on eBay for $15. I didn't tell my wife that I was trying to fix her save -- I didn't want to get her hopes up and I didn't actually think it would be possible. Presumably the data was irrecoverably damaged, a lost cause. On the other hand, I thought, it couldn't hurt to try.

With the DexDrive, I was able to dump the broken save to a PC and examine it in a hex editor. I ended up printing it out and marking the hex up with a highlighter; though PS1 saves came in 8kb blocks, printing 8kb as 16-columns of hexadecimal data comes out to a lot of pages. Working with an unofficial spec written by the author of a PS1 emulator, I located the main chucks of the data: the header, the icon image, and lastly, the save data itself. Unfortunately, decoding the raw game state data proved challenging; after a few days I decided that it was going to require a lot more work than I had planned.

Instead, I concentrated on the header portion of the data. Because of the placement of the icon (which is at a consistent offset from the top of the file and easy to identify as pixel data in hex), I could tell exactly where the header started and stopped. If the continue menu could tell that the save was busted, maybe it was just the header that was broken. I tested this theory by copying the header data from some other save I got off the internet, and pasting it over the header section of my wife's broken save. Then I saved this data back to the memory card and loaded it up.

Miraculously, it worked. The continue menu showed stats from the other save, but once loaded her game was completely restored. Between ordering the DexDrive and patching the save, the whole process had taken me about three weeks. That night I booted the game up and showed her the continue menu with the strangely named save. She loaded it up and was very surprised to find her progress, her characters, her stats, and her items all as she left them. She was pretty excited, but before we could talk about it she was off to complete another dungeon.

Article Start Previous Page 4 of 4

Related Jobs

CCP — Newcastle, England, United Kingdom

Senior Backend Programmer
Guerrilla Games
Guerrilla Games — Amsterdam, Netherlands

Animation System Programmer
Square Enix Co., Ltd.
Square Enix Co., Ltd. — Tokyo, Japan

Blizzard Entertainment
Blizzard Entertainment — San Francisco, California, United States

iOS Engineer, San Francisco


Juan Belon Perez
profile image
And that's why I admire Insomniac team

Daniel Accardi
profile image
Chris Pruett, marry me?

Will Buck
profile image
That is one dedicated husband, bravo to you Chris!

Aaron San Filippo
profile image
The (S)self exploitation one from Garret is awesome and scary at the same time. I worked with a guy who came from Insomniac before, and he was always going on about fixed point math hacks and stuff and some of the horrors he had seen before. Now I can appreciate all of that a bit more.

Koray Hagen
profile image
I only wish there was more. Absolutely hilarious.

Amir Ebrahimi
profile image
Re: The Dalton Allocator, I did something similar at Naughty Dog because we had to fit code and art into a 3MB (IIRC) memory block and quite frequently artists would go up to the very limit and us programmers would be scrounging around for every KB to get the level to fit within memory. Frustrating? Yes. How to solve? Mis-report the memory by 256KB :)

Aaron San Filippo
profile image
I've heard similar stories before - reserve some "shipping time" memory and don't tell the art team about it. Very efficient solution to the problem ;)

Joseph Moore
profile image
Yeah, that's a very common technique. On a DS title I worked on, we reserved a rather sizable chunk of memory on the side as a "just in case" buffer. Whenever a level designer needed a bit more memory for levels, an artist a bit more for textures, or a sound designer a bit more for audio, we could dole it out. (We, of course, made a great show of scrounging and optimizing to obtain the requested memory.) By the end of our development cycle, the buffer was nearly gone.

Brian Schmidt
profile image
Joseph--that's funny...
When I was doing Genesis/SNES music and sound, I'd do the same thing, though in reverse. My system was designed to submit a single black-box binary file to the developer. I'd always make sure my first delivery filled up my entire audio budget, even though most of the binary was empty. That way, I could "save the day" by being able to add in sounds late in the game, or by "optimizing" my audio to give some back to the developer...

Jane Castle
profile image
@Joseph Moore..... lol! You are like a memory banker loaning out memory.....

Sean Sanders
profile image
I love this series! That (s)Elf manipulation trick is the nastiest / coolest.

The "Dalton Allocator" sounds familiar. I discovered when working on a PS3 game that Audiokinetic, the makers of the audio engine we licensed, actually had a recommended knowledgebase article on streaming audio stored in GPU memory, which we exploited to great effect.

y h
profile image
hehe, very nice material, inspiring in many levels !

and I rise my hand to ask for more of these !

Leroy Sylva
profile image
I chuckled at the HR hacks story.

Jacob Pederson
profile image
I actually did something similar to Chris Pruett, with a Diablo 1 on PS1 save file, successfully moving it from emulation to the real system by copying headers.

Reverend Ted
profile image
The PC version of DRIV3R has a bug (or it seems like it has a bug) where the Cheats menu doesn't unlock after beating the game. To this day I have only a vague sense of how I managed to figure out where in the ProfileData the "triggers" were stored, but I managed to locate and unlock them by hex editing the ProfileData file (a component of the DRIV3R savegame system). Felt pretty proud of myself for that one.

David Hawisher
profile image
The EULA exploitation is HORRIFYING. And clever.

Aiden Eades
profile image
Jamming the cartridge isn't really a dirty programming trick though, it's just optimization, sure it's not optimiation in terms of speed, but it's still a form of optimization.