/r/Doom Subreddit — I ported FreeDoom to Apple Watch since I couldn’t find a WatchOS Doom port – From /r/Doom
Go to Source
Hey r/Doom,
I wanted to finally share around something I’ve been working on called WOOM (Watch Doom) – a native watchOS port of FreeDoom that runs entirely on Apple Watch. It’s built using SwiftUI + a custom C bridge to DoomGeneric. The actual Apple App store name is “Woom – WAD Player” as I eventually wanted to let the user upload other wad files for different game campaigns.
Why I did it was I originally wanted to play Doom on my Apple Watch for when I only have my Apple Watch on me. When I couldn’t find such an app I though I would give it a go with FreeDoom assets and brush up on Swift programming at the same time.
Some interesting programming challenges were:
– watchOS has tight performance limits. I implemented adaptive frame timing: the runner measures frame time every 10 ticks and adjusts the interval (16ms→20ms→28ms) dynamically. If avg > 23ms, it backs off; if < 14ms, it ramps up.
– FreeDoom’s save prompt was hard to do when I couldn’t figure out how to pass the WatchOS keyboard keys to the game. Instead, I detect when the prompt is active, auto-fill the save name, and present a SwiftUI toast with “Rename” / “Save” / “Cancel” buttons that drive text input or confirm. This mostly works but it doesn’t look pretty at the moment. Part of the neat functionality of the companion iOS app is you can backup the game saves. This is also to prevent the Apple Watch app from loosing the game saves that live locally.
– AVAudioEngine works, but you cannot link CoreAudioTypes directly. I use -weak_framework CoreAudioTypes and rely on AVFoundation’s implicit dependency. TinySoundFont for MIDI was a lifesaver, general MIDI rendering with zero external dependencies.
A direct link to the Apple Store download can be found here: https://apps.apple.com/us/app/woom-wad-player/id6751957091
Note that the Apple store for some reason doesn’t automatically show the Apple Watch sample screenshots and you have to click the “Apple Watch” text to preview them.
I’m also not sure what to do next with the app as I just wanted to see if I can get the app to a “functional” state.
submitted by /u/Cateotu
[link] [comments]
