Doom ported to a standalone Microsoft Word document — plays well but there's no sound

Wojciech Graj ported Doom to Word
(Image credit: Wojciech Graj)

A software engineer has ported Doom to a standalone Word document. The single 6.6MB document file, available via GitHub, contains a source port of doomgeneric. Users will need a modern version of Microsoft Office/Word on an x86 computer system, and eschew security warnings, to enable the VBA macro in the document to run.

Netherlands-based Wojciech Graj is the brains behind this project. On social media, Graj explains that he was inspired to port Doom to a Word document after seeing DoomPDF, which was in turn inspired by Pdftris. The video above shows that this version of Doom looks far more faithful to what a retro-gamer would expect than the PDF efforts. The graphics look similar to the original experience here, and it runs at a fair pace.

However, Word-based Doom is far from Graj's first oddball Doom porting exercise. He also has published projects like Doom-ascii, Doom in Stardew Valley, and Doom in Minecraft.

Returning our attention to WordDoom, or DoomWord (Graj doesn't seem to have a preference), the software engineer explains that this feat is achieved through the document containing the doomgeneric_docm.dll library and doom1.wad game data encoded in base 64. Upon opening the document, a VBA macro is set up to extract the b64 data and load it.

In the video, the game seems to run quite smoothly. However, in the background, "Every game tick, doomgeneric.dll creates a bmp image containing the current frame and uses GetAsyncKeyState to read the keyboard state," notes Graj. Perhaps this is why the viewport is quite small (original 320 x 200 pixels?) — to keep the game responsive.

WordDoom gamers can use their arrow keys for movement, Control key for fire, Space key for use, and number keys 1-7 for weapon selection. Graj highlights that there is no sound in this game release.

We opened the downloaded doom.docm file to a spare computer, but the Word 2007 version installed on the machine must have been missing something, even though we accepted the security warning concerning macros.

If this Doom port has tickled your interest, it might be worth a dig through Graj's other Doom projects, linked above. The Tom's Hardware archive is also full of stories of Doom being ported to weird and wonderful devices/platforms, including lawnmowers, a web Captcha system, and even keyboard keycaps.

TOPICS
Mark Tyson
News Editor

Mark Tyson is a news editor at Tom's Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason.

  • Razzi16
    Yes of course this is EXTREMELY clever, there is no doubt about that.
    But that is what infuriates me about a lot of software, there is no reason whatsoever to allow a full program such as this to run within a document editor or PDF viewer.
    Are we really surprised there are so many vulnerabilities regularly taken advantage of by bad actors when a lot of software which shouldn't, allows stuff like this to happen?
    Reply
  • wwenze1
    Razzi16 said:
    Yes of course this is EXTREMELY clever, there is no doubt about that.
    But that is what infuriates me about a lot of software, there is no reason whatsoever to allow a full program such as this to run within a document editor or PDF viewer.
    Are we really surprised there are so many vulnerabilities regularly taken advantage of by bad actors when a lot of software which shouldn't, allows stuff like this to happen?
    When you open the document, VBA is disabled until you click a button in the warning bar at the top to confirm you want to enable VBA. And VBA is essentially a full programming language......
    Reply
  • USAFRet
    Razzi16 said:
    Yes of course this is EXTREMELY clever, there is no doubt about that.
    But that is what infuriates me about a lot of software, there is no reason whatsoever to allow a full program such as this to run within a document editor or PDF viewer.
    Are we really surprised there are so many vulnerabilities regularly taken advantage of by bad actors when a lot of software which shouldn't, allows stuff like this to happen?
    Word, along with all the other MS Office components, has VBA as its underlying subsystem.
    Disabled by default.

    But you can do a LOT in VBA. A full featured language.
    Reply
  • SlothAlmighty
    There is no Doom port that surprises me anymore. But this would be one of my favourites, because it's shows this game was so well constructed you can basically play it on a piece of paper (symbolically speaking)
    Reply