Doom gets ported to the Apple Watch, to our utter horror (and fascination)
Arguably the most-ported game in the universe, id Software’s Doom was written in C in 1993 back at a time when this wasn’t always the case; just a small portion of the code was assembly to speed up the most necessary graphics routines. John Carmack and John Romero wrote the game in C specifically to enable this kind of wanton platform transfer. Since then, we’ve seen just about everything in the tech world run a copy of Doom, but this latest port has to be the most ridiculous: the Apple Watch.
Yep, imagine firing your BFG9000 and rocket launcher on a 1.5-inch (or 1.7-inch, if you splurged for the 42mm version) capacitive touch screen. Think about that for a minute: That screen has to include the controls for the game, since there isn’t a separate keyboard you can use to strafe while shooting.
The party responsible for this glorious nonsense is the team at Facebook’s Tel-Aviv office. In a Facebook post, the group said that since Apple recently released beta versions for watchOS 2 that let you run native apps on the device, they “thought it would be fun to port Doom over to it,” especially since John Carmack is currently a colleague of theirs. They started with nDoom, a simpler version of the game, fired up Xcode -> File -> New Project, fixed a few things, and got a version that compiled (but that didn’t run). They spent the next few hours troubleshooting it and tuning its performance, and to overcome the lack of UI real estate, they overlaid a 3×3 grid of invisible buttons to account for the lack of hardware controls.
There are plenty of details in the post, such as how they handled rendering frames:
Yep, imagine firing your BFG9000 and rocket launcher on a 1.5-inch (or 1.7-inch, if you splurged for the 42mm version) capacitive touch screen. Think about that for a minute: That screen has to include the controls for the game, since there isn’t a separate keyboard you can use to strafe while shooting.
The party responsible for this glorious nonsense is the team at Facebook’s Tel-Aviv office. In a Facebook post, the group said that since Apple recently released beta versions for watchOS 2 that let you run native apps on the device, they “thought it would be fun to port Doom over to it,” especially since John Carmack is currently a colleague of theirs. They started with nDoom, a simpler version of the game, fired up Xcode -> File -> New Project, fixed a few things, and got a version that compiled (but that didn’t run). They spent the next few hours troubleshooting it and tuning its performance, and to overcome the lack of UI real estate, they overlaid a 3×3 grid of invisible buttons to account for the lack of hardware controls.
There are plenty of details in the post, such as how they handled rendering frames:
“We found Doom’s buffer that holds the actual pixel data for each frame. Every time there’s a new frame to display, we use CoreGraphics to turn the buffer into a UIImage. This initially gave us grayscale images, but after figuring out Doom’s color palettes and applying them we’ve got color! We now set this image as the background image for the top most container.”
Drawing the images to the screen seems to have been the biggest challenge:
“By far the most intensive task was drawing images to the screen. Trying to draw them too fast resulted in an annoying unresponsiveness. Tweaking UIImage’s properties and only updating the image if anything has changed allowed us to squeeze some more juice.”
Given that the end result is sort-of-kind-of animating properly, and seems sort-of-kind-of-playable, we’ll tip our hats to the group. We also salute the video’s soundtrack: E1M1’s “At Doom’s Gate,” played as it should be through a Roland SCC-1 Sound Canvas card and recorded to audio, complete with a heavy dose of early 90’s reverb. Given that the Apple Watch may not be selling as well as Apple had hoped, dare we suggest more projects like this get the green light?