Skip to content

Instantly share code, notes, and snippets.

@mikegrima
Last active May 14, 2023 04:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mikegrima/d749bc315bf37db8263c0e394805a32c to your computer and use it in GitHub Desktop.
Make Ur-Quan Masters Playable

The Ur-Quan Masters Gameplay Speed Reduction

I loved playing Star Control on the Sega Genesis and was really happy that The Ur-Quan Masters came out. However, I find that the ship combat speed is way too fast. If you've played the Sega Genesis version of Star Control, you'd be used to a much slower gameplay speed.

It turns out that you can make Ur-Quan Masters run at a similar (or whatever) speed you want: you just need to edit the source code to do this. However, the good news is, it's pretty straightforward.

TL;DR: What do I fix?

You need to modify the src/uqm/battle.h file's BATTLE_FRAME_RATE variable:

#define BATTLE_FRAME_RATE (ONE_SECOND / 24)

Make the / 24 smaller for slower gameplay, and larger for faster gameplay. For me, I found that 12 is just about right and is very close to the Sega Genesis (but just a tad faster):

Fixed Code:

#define BATTLE_FRAME_RATE (ONE_SECOND / 12)

Once you fix this, all you need to do is re-compile and you are all set.

Long Instructions

You need to:

  1. Download the source code and the 3 Content files listed on the same page.
    • At the time of me writing this (version 0.8.0), I needed to download uqm-0.8.0-content.uqm, uqm-0.8.0-voice.uqm, and uqm-0.8.0-3domusic.uqm in addition to uqm-0.8.0-src.tgz.
  2. Un-tar the tarball
  3. Make the changes to the file as specified above in TLDR section.
  4. Follow the instructions in the INSTALL file.
    • I installed this on an Apple Silicon Mac (macOS Monterey), and I needed to have XCode, and homebrew installed. The instructions will ask you to install some homebrew libraries.
    • If you are using an Apple Silicon mac, then you must follow the instructions in the Apple Silicon section before returning back here. If you are using an Intel mac, then proceed.
    • Once that was done, I ran ./build.sh -j4 uqm
    • A menu is presented on the first run, and I set the target to release vs. debug (this really shouldn't matter much)
  5. Once built, you need to make the content/packages directory, and move the 3 *.uqm content files that you downloaded earlier in there.

At this point, you should be all set. You just need to run ./uqm (or ./uqm-debug if you kept the defaults) and you are good to go!

Apple Silicon

For AS macs, there are a few things you need to do.

  1. First thing you need to do is update the build/unix/config_proginfo_build file, namely the these lines:

    case "$HOST_SYSTEM" in
    Darwin)
    	EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-mmacosx-version-min=10.6 -arch x86_64'
    	EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-mmacosx-version-min=10.6 -arch x86_64'
    	EXTRA_PLATFORM_GCC_FLAGS_LINK='-mmacosx-version-min=10.6 -arch x86_64'
    	useGccBuildTools
    	;;
  2. Replace x86_64 in those lines above with arm64 and then save the file. It should look like this:

    case "$HOST_SYSTEM" in
    Darwin)
    	EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-mmacosx-version-min=10.6 -arch arm64'
    	EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-mmacosx-version-min=10.6 -arch arm64'
    	EXTRA_PLATFORM_GCC_FLAGS_LINK='-mmacosx-version-min=10.6 -arch arm64'
    	useGccBuildTools
    	;;
  3. Once that is done, before running the ./build.sh command, you will need to export the Homebrew location C and Library paths:

    export CPATH=/opt/homebrew/include
    export LIBRARY_PATH=/opt/homebrew/lib

    Otherwise it won't be able to locate libpng.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment