O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


 
Buy the book!
Gaming Hacks
By Simon Carless
October 2004
More Info

HACK
#81
Put Your Face in DOOM
Increase the immersiveness of id's classic FPS by replacing the space marine's pictures with your own
[Discuss (1) | Link to this hack]

id Software's groundbreaking DOOM almost singlehandedly created the modern FPS genre. With style oozing from every crevice, a near-infinite amount of customizability, and an open source codebase, it's no wonder that people still play variants such as PrBoom (http://prboom.sourceforge.net/).

As any dedicated modder will tell you, half the fun is in making your own fun. Earlier games were also hackable, but DOOM was unique in encouraging gamers to add their own maps, weapons, and graphics. Since it was a pre-Windows pioneer, the tools aren't very user-friendly, but they exist and work with a little prodding.

Creating your own maps is a lot of work, but it's much easier to replace individual graphics. One good way to start is to change the picture of your character in the game's status bar.

Replacing an Image

Besides trial and error, there's really no good way to figure out which image within this WAD to replace. Fortunately, I can tell you that the files in graphics/stf* represent the face in the status bar. I replaced the god-mode powerup image (type iddqd while playing) with a picture of my nephew. DeuTex extracts this image to graphics/stfgod0.pnm.

The trickiest part of this process is building a 24 29 image that looks good in DOOM, especially with its restricted palette. I cropped and adjusted the picture until it fit, then saved it as a 256-color GIF file in graphics/stfgod0.gif. Be sure to keep the same base name as the file you're replacing; otherwise, DOOM won't know how to find the resource. It's okay to use a different file extension; DeuTex converts BMP, GIF, or JPEG files to PPM files automatically when it builds a WAD. If you do use a different extension, though, be sure to move the original file out of the way so that DeuTex will use your replacement.

TIP

For best results, remove the background of the image, leaving only the subject's face and head. The image is much less jarring this way.

The next step is to build a manifest file to tell DeuTex which files to assemble. Open the wadinfo.txt file in your favorite text editor. It has several internal sections for the different types of files within the WAD. Delete everything that you haven't replaced. In my case, I had a very short file:

# List of Pictures (with insertion point)
[graphics]
STFGOD0 -5      -2

Be sure to keep the [graphics] heading, though you can delete the entries beneath it for the images you want to stay the same. Save the file with a different name, perhaps godinfo.txt, so you can make other modifications by copying the relevant lines from the original manifest.


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.