Monday, January 15, 2018

Quake2 on Linux by compiling Yamagi Quake

On my previous post, I talked about using game-data-packager to install Quake2... but what if you want to do it from scratch?

This blog post is basically a distillation of the Yamagi Quake Readme.md, but I hope that it'll help.

  1. Download Yamagi Quake2 7.10
  2. Download q2-3.20-x86-full-ctf.exe patch
  3. Use Wine to extract the 3.20 patch to an empty directory, say, "quake2"
  4. Extract Yamagi Quake2 7.10 to the "quake2/" directory (above)
  5. Make a temp directory, say, "yamagi make files"
  6. Go into "yamagi make files" directory
  7. Clone repository:  git clone https://github.com/yquake2/yquake2.git
  8. Install Dependencies:  apt-get install build-essential libgl1-mesa-dev libsdl2-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev
  9. Build it: type "make"
  10. Copy everything from the "release" folder into your "quake2" folder (step 3)
  11. Copy "pak0.pak" and "videos/" folder from a full version of the game to "quake2/baseq2" folder
  12. Start fragging:  Type "./quake2" in your quake2 folder
References:
https://www.yamagi.org/quake2/

Quake2 on Linux Mint [Jan 2018]

Background:  I have an early-2008 model Macbook Pro (MPB) and I wasted most of an entire extended weekend trying to put OS X El Capitan on (or something close to it) with little success.  The closest I could get was OS X Mavericks but then I got greedy and tried upgrading to El Capitan again...to no avail.

Fast-forward to this weekend and I decided to give up and just put Linux Mint 18.3 on it.  I've also gotten into a nostalgic period (maybe it's the winter), but I decided to started playing my old FPS games like Quake II and Quake I, and I thought, why don't I do this on my laptop?  It can certainly handle the game.

I'm writing this blog because this is definitely not the 1st time I've installed Quake2 on Linux... in fact, it's like the 1st time every time.

1st (Video):  Make sure you have the nVidia drivers enabled.  These can be found in:
Administration ---> Driver Manager
2nd (Wireless for MBP): I have a MacBook Pro, Early-2008 model, so I needed to enable my wireless drivers... it's a Broadcom (BCM4321), which Linux Mint detected, so I had to just enable this in "Driver Manager" again.  I'm currently just using Ethernet cable because it's faster, but the cable gets in the way.

Quake II

From what I understand (I may be mistaken), Linux Mint ships with the Yamagi Quake engine (search for it), which is what we're going to take advantage of here.

Check out my other post if you want to use Yamagi Quake from scratch


Install game-data-packager:  Get this from
Administration ---> Software Manager ---> Search "quake" ---> Select "Quake 2"
From what I understand, this program makes .deb packages to install the games; however, you'll need a full install of Quake II to access the data.

*game-data-packager will install your games in /usr/share/games/

 Package the game:  This took me some time to figure out.  To make a proper .deb install file, you need to point game-data-packager to a full copy of Quake2.  You have a couple options here:
  1. Use Wine to install Quake2 from Steam (install Windows .exe for Steam) so you can grab the files
  2. Grab your Quake2 folder from another machine
I picked choice 2, but either way you just need the path.  From your home directory (or wherever you want the .deb file to land) type this:
$ game-data-packager quake2 --package quake2-full-data /path/to/quake2
 *Note, if you just want the DEMO (which will auto-download):
$ game-data-packager quake2
Install the .deb file:  I simply double-clicked it in my window manager

Start Fragging:  Either type "quake2" in the console or find it under "Games" in your Start Menu 

End notes:
Yamagi Quake: There are other ways to do this, but I found this the easiest.  If you don't have Yamagi Quake, you can go here:
https://www.yamagi.org/quake2/


Set your screen resolution:  I'm on a MPB, 17" so I had to change the in-game settings for Quake2 to "fullscreen" and "1400x900", as that's my native resolution for this laptop.

Hope this helps.