Programmer Makes Doom Run in… Microsoft Word?

Screenshot of a version of Doom played in Microsoft Word

As crazy as it might seem, one talented software engineer managed to port the original Doom to a standalone Word document.

Doom Is Now Playable in Word

We’ve all seen headlines like “running Doom on X type of device” which was not originally intended to be used in such a manner. These could range from original Game Boys, to smart fridges, and even graphing calculators. And while all of these are impressive in themselves, what if you could run Doom inside of a Word document?

This is exactly what Netherlands-based Wojciech Graj managed to do recently. The developer explained that he was inspired to port Doom to a Word document after seeing DoomPDF, which was in turn inspired by Pdftris. As you might already have guessed, Pdftris is a version of Tetris that runs in a PDF file.

However, it seems that porting Doom to a Word file might be harder as the game itself is much more complex. Not only that, but the final result seems rather close to the original with its colorful graphics. Unfortunately, since Word doesn’t have any sound, neither does the playable Doom version. Despite that, it’s still super impressive that you can murder hordes of demons… in a Word document.

How Did Graj Do This?

According to the software engineer, Doom’s porting to a Word file was done using the doomgeneric_docm.dll library and doom1.wad game data encoded in base 64. When you open the Doom Word document, a VBA macro is set up to extract the b64 data and load it.

While you play the game, every game tick, doomgeneric.dll creates a bmp image containing the current frame and uses GetAsyncKeyState to read the keyboard state. You can use the arrow keys for movement, the Control key for fire, the Space key for use, and number keys 1-7 for weapon selection.

If you want it try out this Doom version for yourself, you can download it from Graj’s GitHub page. You should also note that you will need a modern version of Microsoft Office/Word on an x86 computer system, as well as eschew security warnings, to enable the VBA macro in the document to run.

Doom on Word isn’t the only interesting project that Graj has worked on. In fact, the programmer has brought the classic FPS to other platforms and even games. His other projects include things like Doom-ascii, Doom in Stardew Valley, and Doom in Minecraft, so why not check them out as well?

Leave a Reply

Your email address will not be published. Required fields are marked *