Skip to content

ByteOverlord/Watch_Quake

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Logo 18.11.2022

Watch_Quake is a Quake 1 port for Apple Watches that uses software rendering and has working audio playback. Runs shareware and registered versions of the game with optional music tracks.

https://www.youtube.com/watch?v=ptKAh8RgzJM Benchmark (Series 5)
https://www.youtube.com/watch?v=89TAt72eYt4 Gameplay (Series 5)

This port started from the original Quake Watch port by Tomas "MyOwnClone" Vymazal.

Contents

About
Changes by ByteOverlord
Features
Changelog
Game Size
Benchmark
Known Issues
Building Requirements
Building the Watch_Quake
Adding music to Watch_Quake (Optional)
Credits
License

About

We where intrigued by MyOwnClone’s quake_watch port and saw the potential of the Apple Watch. The controls needed be tweaked a bit and adjust the game to run in fullscreen. We envisioned a port that would feel closer to a commercial release but have the same menu structure and feel of the original 1996 Quake release. The initial spark was given for the project and ByteOverlord started refining the various aspects about this game port.

Photo

Changes by ByteOverlord

  • Sound Mixer separated to a second thread from the drawing pipeline to give the Mixer more time for processing.
  • “cd” audio support added. Audio file format “Mono, 22050 Hz, WAV, IMA ADPCM” preferred for lower processing and minimal space required.
  • Timer changed from “ns_timer” to “dispatch_source” (Possibly more accurate).
  • Main menu custom texts are drawn on the fly from the original texture so no extra textures needed (Maps, Cheats).
  • Maps menu added with custom level screenshots and selectable difficulty.
  • Cheats menu added with toggles that stay active in level changes.
  • Saves game config (Options) and save games (.sav) in “Application Support” folder. Game config saves automatically when the app goes to background.
  • Resolution setting is automatic with hud, menu and console notification placements affected by resolution.
  • "Run Benchmark" mode with selectable Demo1, Demo2 and Demo3 added in the options menu.
  • DefragAllocator and DefragCache. Replaces sound cache.

Photo

Features

  • PAK0 and PAK1 loading
  • Menu screen
  • Save and load game
  • Autosaving of options
  • Map quick select screen
  • Cheat activation screen
  • Tweaked controls for watch interface
  • Underwater audio effect
  • Position and animation interpolation
  • Music playback
  • Benchmark mode
  • Automatic native resolution (Series 4 40mm -> Ultra)

Controls

Controls

Changelog

04.12.2022

  • Cameralook fix (Better input handling)
  • Sound fix (Stabilized performance on newer watches (tested on SE 2nd Gen))

27.11.2022

  • Benchmark section added
  • Series 4 updated as supported in requirements
  • DefragAllocator added in the project
  • Sound fixes
  • "Run Benchmark" added in the options menu
  • Menu controls tweaked

19.11.2022

  • Sound fix (Fixed possible crash with audio cache)

Game size

Complete game with optional music takes ~ 99,4 MB on the watch.

PAK0.PAK is 18,7 MB
PAK1.PAK is 34,3 MB
Music Tracks are 39,3 MB (converted with Audacity (Mono, 22050 Hz, WAV, IMA ADPCM))

Benchmark

Reference table:

Good Moderate Bad
≤ 5 ms 6-12 ms > 16 ms

Results:

DEMO1 Avg Low High
S4 40mm 5.94 2.63 13.41
S4 44mm 6.14 2.99 13.54
S5 40mm 5.32 2.44 13.84
S5 44mm 6.13 2.71 13.96
SE (1st Gen) 40mm - - -
SE (1st Gen) 44mm - - -
S6 40mm - - -
S6 44mm - - -
S7 41mm - - -
S7 45mm - - -
SE (2nd Gen) 40mm - - -
SE (2nd Gen) 44mm 7.35 2.61 14.98
S8 41mm - - -
S8 45mm - - -
Ultra - - -
DEMO2 Avg Low High
S4 40mm 5.50 1.95 14.79
S4 44mm 5.85 2.59 13.79
S5 40mm 5.19 2.12 13.43
S5 44mm 5.94 2.51 15.36
SE (1st Gen) 40mm - - -
SE (1st Gen) 44mm - - -
S6 40mm - - -
S6 44mm - - -
S7 41mm - - -
S7 45mm - - -
SE (2nd Gen) 40mm - - -
SE (2nd Gen) 44mm 6.77 2.12 15.20
S8 41mm - - -
S8 45mm - - -
Ultra - - -
DEMO3 Avg Low High
S4 40mm 6.21 1.99 14.21
S4 44mm 6.45 2.43 15.70
S5 40mm 5.38 2.07 13.75
S5 44mm 6.41 2.78 14.01
SE (1st Gen) 40mm - - -
SE (1st Gen) 44mm - - -
S6 40mm - - -
S6 44mm - - -
S7 41mm - - -
S7 45mm - - -
SE (2nd Gen) 40mm - - -
SE (2nd Gen) 44mm 7.47 2.06 14.59
S8 41mm - - -
S8 45mm - - -
Ultra - - -

Benchmarks are only indicative.

Known Issues

  • Audio will not transmit through Bluetooth
  • Shareware version (using only PAK0) softlocks when going through a episode 2-4 portals
  • Smooth animation on, torches flicker on the edges of the view
  • R_AliasDrawModel trivial_accept disabled (Incorrect bounding box?)
  • Sound does not playback on app start (Put the game to the dock and open it from there again.)
  • App does not start anymore (Build the app to the watch from Xcode). There is a 7 day testing period on a 'Free Provisioning' profile.

Building Requirements

  • Apple Watch Series 4 or later with watchOS 9.1 or later
  • iPhone 8 or later with iOS 16 or later
  • Mac with macOS 12.5 or later
  • Xcode 14.1 or later with command-line tools
  • Homebrew
  • Innoextract
  • bchunk (only for music)
  • Audacity (only for music)

Building the Watch_Quake

  1. Install Xcode through Apple AppStore and install command-line tools when Xcode asks for it.

Screenshot

  1. Download the Watch Quake from GitHub. (https://github.com/ByteOverlord/Watch_Quake)

Screenshot

  1. Get Quake through gog.com (if you just want to use the shareware jump to step “8. Copy PAK...” and only use the shareware’s PAK0.PAK)

  2. Download the quake installer from your gog.com profile:
    "gog.com Profile" -> Games -> Quake -> View Downloads -> Download Offline Backup Game Installers -> Quake

Screenshot

Screenshot

Screenshot

  1. Install Homebrew from terminal:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/homebrew/go/install)"

  2. Install innoextract from Homebrew:

brew update
brew install innoextract
  1. In terminal extract the Quake game files with innoextract:
    innoextract “downloaded setup_quake_the_offering_2.0.0.6.exe file location”

(innoextract will extract an “app” and "tmp" folders in current working directory.) "app" folder has the needed PAK files and optional audio.

  1. Copy PAK0.PAK and PAK1.PAK files to WatchQuake project (PAK names have to be uppercase (case sensitive)):
    /WatchQuake Watch App/Resources/id1/

  2. Open the GitHub WatchQuake Xcode project.

  3. In WatchQuake project file go to:
    WatchQuake -> Targets -> WatchQuake -> Signing & Capabilities

  4. Select your "Team" and write a unique “Bundle Identifier”.

Screenshot

  1. Then in WatchQuake project file go to:
    WatchQuake -> Targets -> WatchQuake Watch App -> Signing & Capabilities

  2. Select your "Team" and use the same “Bundle Identifier” as previously but with “.watchkitapp” added at the end.

Screenshot

If the project “Frameworks” folder shows the framework texts in red continue with step 14.

Screenshot

If the project “Frameworks” folder shows the framework texts in white jump to step 17.

Screenshot

  1. In WatchQuake project file go to:
    WatchQuake -> Targets -> WatchQuake -> Build Phases -> Link Binary With Libraries

  2. Add these frameworks:

AVFoundation.framework
CoreGraphics.framework
Foundation.framework
SwiftUI.framework
UIKit.framework

Screenshot

  1. And after adding them delete the frameworks with red text.

  2. Check that the project is on release setting.

Screenshot

  1. Test the build first with a simulator (Series 5 Simulator or up (watchOS Simulator))

Screenshot

  1. After testing connect iPhone to the Mac with a cable and make sure Apple Watch has a connection to iPhone.

  2. Set the iPhone and Apple Watch in to "Developer" mode.

On iPhone:
Settings -> Privacy & Security -> Developer Mode (SECURITY) -> Developer Mode

Screenshot

Screenshot

Screenshot

On Apple Watch:
Settings -> Privacy & Security -> Developer Mode (SECURITY) -> Developer Mode

Screenshot

Screenshot

Screenshot

After the devices have restarted.

  1. Select the Apple Watch as target.

Screenshot

  1. From Xcode build the Watch_Quake to the watch.

Screenshot

Transfer times:
<1 min (iPhone X & S4 40mm)
5-20 min (iPhone X & S5 44mm)
<1 min (iPhone 12 mini & S5 40mm)
<1 min (iPhone 12 mini & SE 2nd Gen 44mm)

Adding music to Watch_Quake (Optional)

  1. Install bchunk from terminal:
    brew install bchunk

  2. Extract game music from the gog game files:
    bchunk -w “game.gog file location” “game.cue file location” track

  3. (Music tracks will extract in to current working directory (track02 - track11.wav).)

  4. Open Audacity and drag the tracks to it. Edit the tracks to Mono.
    Select -> All
    Tracks -> Mix -> Mix Stereo Down to Mono

Screenshot

Screenshot

  1. Set the “Project Rate (Hz)” to 22050.

Screenshot

  1. Export tracks with “Export Multiple” in “WAV” format with “IMA ADPCM” encoding.

Screenshot

Screenshot

  1. Place the exported audio files (track02 - track11.wav) inside the Watch Quake project:
    “WatchQuake Watch App/Resources/id1/music/”

  2. From Xcode build the Watch_Quake to the watch.

Screenshot

Transfer times:
<1 min (iPhone X & S4 40mm)
5-20 min (iPhone X & S5 44mm)
<1 min (iPhone 12 mini & S5 40mm)
<1 min (iPhone 12 mini & SE 2nd Gen 44mm)

Photo

Credits

quake_watch https://github.com/MyOwnClone/quake_watch
vkquake (Underwater sound filter, snd_dma init) https://github.com/Novum/vkQuake
Quakespasm (Position and animation interpolation) https://github.com/sezero/quakespasm
Quake_For_OSX https://github.com/Izhido/Quake_For_OSX
Quake-iOS https://github.com/tomkidd/Quake-iOS
Quake source code by Id Software. https://github.com/id-Software/Quake
App icon, documentation and video by IdeaVoid

License

This software is released under the terms of the GNU General Public License v2.