Page 1 of 1

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sat Apr 28, 2012 9:58 pm
by abishur
Okay so after a *lot* of experimenting talking to the developers of UQM etc, etc, I finally worked out how to get this timeless classic working on the Pi and it is *really* easy.

As a note of warning:

1.  This has no education value what-so-ever.  It is just a classic game I love and I am sharing my findings with you.

2. You will have to have an SD card larger than 2 GB, I tried installing it before re-sizing my partitions and there is just not enough space left over for this ~191MB (with all options) game to install.

Step 1:

Edit /etc/apt/sources.list and add the following two lines

deb http://ftp.us.debian.org/debian/ squeeze contrib

deb http://ftp.us.debian.org/debian/ squeeze contrib non-free

Save the file and the run

sudo apt-get update

It will probably complain about there being duplicate entries and tell you to run apt-get update to fix the problem.  Ignore it's circular logic, you're fine

Step 2:

Apt-get the packages (I am assuming at this point you have resized your partitions using your program of choice on a separate computer)

apt-get install uqm uqm-content uqm-music

(Optionally, if you want to hear them talking you can also do uqm-voices but it is not necessary)

Step 3:

Copy the xinitrc script.  Uqm does not work directly off framebuffer for some reason at this point.  I never could solve that problem.  At the same time, I did not want to edit my config.txt file every time I wanted to play the game and have it boot into a lower resolution so it would take the full screen instead of a tiny little blip on it.

The solution to this annoying little problem is to initiate an x session (thanks Jojopi!) using xinit and have it run a quick script to resize the window.  Here is what to do:

Optional:

Make a script folder (in the home directory I always make a folder to hold my custom scripts).  I am using the default user pi in this example, but you can swap that out for whatever user you have created.

mkdir /home/pi/scripts

Copy the existing xinitrc script

sudo cp /etc/X11/xinit/xinitrc /home/pi/scripts/xinitrc2

You can technically name it whatever you want, I just put a 2 on the end of it cause I am lazy.

Step 4:

Edit the file

sudo nano /home/pi/scripts/xinitrx2

Remove the existing non-commented line that says

. /etc/X11/Xsession

And add the following two lines in its place

fbset -xres 640 -yres 480
/usr/games/uqm

The first line changes the size of the window down to the right size and the second launches the game

Make sure to make it executable by users by issuing

sudo chmod +x /home/pi/scripts/xinitrc2

You can now launch the game by typing

sudo xinit /home/pi/scripts/xinitrc — -nocursor

Two things to note about this.  Due to the nature of my work around, even though it looks full screen, what you are actually seeing is a 640x480 portion of your full screen; specifically the top left hand corner of the screen.  This works fine since it is where the game will be displayed, but you will not be able to do anything until the mouse is on this window.  This is not a mouse game so having it in the way is *really* annoying so I put the argument "-nocursor" to hide the cursor from the screen.  You just need to move the mouse up and left until the keyboard starts responding.

You can get around *that* issue by using a gamepad device (I have been using a wireless PS2 remote and a PS2 to usb convertor).

Step 5: The lazy man optional step

If you do not want to have to type that every time to start the game do the following:

sudo nano /usr/bin/uqm

In the file it creates type the following

#! /bin/bash

xinit /home/pi/scripts/xinitrc — -nocursor

Save it and close it then make it executable with

sudo chmod +x /usr/bin/uqm

Then all you need to do to execute it is

sudo uqm

Here is a pic of me playing it with the wireless controller



If you get an error message when you try to load it, make sure you have enabled sound by running

sudo modprobe snd-bcm2835

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sat Apr 28, 2012 10:27 pm
by rmm200
Videos!  We need Videos!

If you can - would live an idea of what this game is about...

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sat Apr 28, 2012 11:03 pm
by abishur
There are a *ton* of vids on youtube about this, but here's a short synopsis that I'll make up for you right now

You and a team of scientists and their families have been isolated for 20 years in a distant star system, you have uncovered an advanced alien ship building yard.  There weren't enough materials to build a full ship but you manage to build the skelton of ship.  You return to earth only to discover that humanity and it's allies lost the war against the Ur-quan and humanity is enslaved under an impenetrable shield.

Using an orbiting starbase as a point of operation outfit your ship, explore the galaxy, build alliances, and discover artifacts to help defeat the Ur-quan and their deadly allies.

Gameplay consists of 3 main aspects:

1. move a lander (shuttle pod) around the surface of a planet to gather materials, biological samples and artifacts

2. Fight in space battles

3. Explore the galaxy

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sat Apr 28, 2012 11:24 pm
by rmm200
Dang! A mini-StarCraft!  Hard to believe there is a SciFi game I never heard of.

Found a bunch of YouTube videos – what a great game to port to the Pi!

All these games will have to go on a special Teacher's SD Card, so while the kids are coding in Python, the teacher won't be bored.

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sun Apr 29, 2012 9:23 am
by texy
I,ve done this :


Step 1:

Edit /etc/apt/sources.list and add the following two lines

deb http://ftp.us.debian.org/debian/ squeeze contrib

deb http://ftp.us.debian.org/debian/ squeeze contrib non-free

Step 2:

Apt-get the packages (I'm assuming at this point you've resized your partitions using your program of choice on a separate computer)

apt-get install uqm uqm-content uqm-music


...but I get this :

[email protected]:/home/texy# apt-get install uqm uqm-content uqm-music
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package uqm
E: Unable to locate package uqm-content
E: Unable to locate package uqm-music ..this is running debian under virtualbox i windows vista.Any help for a linux newbie? Texy

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sun Apr 29, 2012 10:40 am
by texy
Answering my own post....i had to do a apt-get update command to get it to find the uqm depositries. At least thats what I think I did, lol.

Texy

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sun Apr 29, 2012 1:32 pm
by abishur
Whoops, yes, I left out and apt-get update command, sorry!   Fixing that now.

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Wed Jul 18, 2012 7:09 pm
by Jimus
Does anyone know if this is available on Raspbian? I've added the following to my sources.list

Code: Select all

deb http://archive.raspbian.org/raspbian/ wheezy contrib
deb http://archive.raspbian.org/raspbian/ wheezy contrib non-free
and run

Code: Select all

apt-get update
but I get the following error
Package uqm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

any help would be greatly appreciated.

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Wed Jul 18, 2012 7:23 pm
by abishur
They having to add each package right now, so this one is probably low on the totem pole ;-) You should be able to build it from source though.

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Wed Jul 18, 2012 9:55 pm
by Jimus
Compiling now :-)

For anyone who's interested in doing the same, I followed the instructions here http://forums.debian.net/viewtopic.php?f=16&t=38976

You just need to use

Code: Select all

deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free
In the to sources.list get the source from the raspbian repository

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Thu Jul 19, 2012 6:40 pm
by Narf03
Ah I still remember this game, used to love it. Basically u have to find resource on planet, buy technology from alien trader, upgrade your ship, when powerful enough, start doing quests, then defeat the final boss.

When u have all the coordinates(after beat the game once), the game will become extremely easy.

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Tue Aug 21, 2012 11:58 pm
by Signs
abishur wrote:Okay so after a *lot* of experimenting talking to the developers of UQM etc, etc, I finally worked out how to get this timeless classic working on the Pi and it is *really* easy.

As a note of warning:

1.  This has no education value what-so-ever.  It is just a classic game I love and I am sharing my findings with you.

2. You will have to have an SD card larger than 2 GB, I tried installing it before re-sizing my partitions and there is just not enough space left over for this ~191MB (with all options) game to install.

Step 1:

Edit /etc/apt/sources.list and add the following two lines

deb http://ftp.us.debian.org/debian/ squeeze contrib

deb http://ftp.us.debian.org/debian/ squeeze contrib non-free

Save the file and the run

sudo apt-get update

It will probably complain about there being duplicate entries and tell you to run apt-get update to fix the problem.  Ignore it's circular logic, you're fine

Step 2:

Apt-get the packages (I am assuming at this point you have resized your partitions using your program of choice on a separate computer)

apt-get install uqm uqm-content uqm-music

(Optionally, if you want to hear them talking you can also do uqm-voices but it is not necessary)

Step 3:

Copy the xinitrc script.  Uqm does not work directly off framebuffer for some reason at this point.  I never could solve that problem.  At the same time, I did not want to edit my config.txt file every time I wanted to play the game and have it boot into a lower resolution so it would take the full screen instead of a tiny little blip on it.

The solution to this annoying little problem is to initiate an x session (thanks Jojopi!) using xinit and have it run a quick script to resize the window.  Here is what to do:

Optional:

Make a script folder (in the home directory I always make a folder to hold my custom scripts).  I am using the default user pi in this example, but you can swap that out for whatever user you have created.

mkdir /home/pi/scripts

Copy the existing xinitrc script

sudo cp /etc/X11/xinit/xinitrc /home/pi/scripts/xinitrc2

You can technically name it whatever you want, I just put a 2 on the end of it cause I am lazy.

Step 4:

Edit the file

sudo nano /home/pi/scripts/xinitrx2

Remove the existing non-commented line that says

. /etc/X11/Xsession

And add the following two lines in its place

fbset -xres 640 -yres 480
/usr/games/uqm

The first line changes the size of the window down to the right size and the second launches the game

Make sure to make it executable by users by issuing

sudo chmod +x /home/pi/scripts/xinitrc2

You can now launch the game by typing

sudo xinit /home/pi/scripts/xinitrc — -nocursor

Two things to note about this.  Due to the nature of my work around, even though it looks full screen, what you are actually seeing is a 640x480 portion of your full screen; specifically the top left hand corner of the screen.  This works fine since it is where the game will be displayed, but you will not be able to do anything until the mouse is on this window.  This is not a mouse game so having it in the way is *really* annoying so I put the argument "-nocursor" to hide the cursor from the screen.  You just need to move the mouse up and left until the keyboard starts responding.

You can get around *that* issue by using a gamepad device (I have been using a wireless PS2 remote and a PS2 to usb convertor).

Step 5: The lazy man optional step

If you do not want to have to type that every time to start the game do the following:

sudo nano /usr/bin/uqm

In the file it creates type the following

#! /bin/bash

xinit /home/pi/scripts/xinitrc — -nocursor

Save it and close it then make it executable with

sudo chmod +x /usr/bin/uqm

Then all you need to do to execute it is

sudo uqm

Here is a pic of me playing it with the wireless controller



If you get an error message when you try to load it, make sure you have enabled sound by running

sudo modprobe snd-bcm2835
I am not interested in the game, but I am interested on how loosing the mouse point from the screen, so it does not show up on the screen at all. "I don't need or want to see no stinking mouse cursor" :lol:

Thank you,

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Wed Aug 22, 2012 1:50 am
by abishur
Signs wrote:
I am not interested in the game, but I am interested on how loosing the mouse point from the screen, so it does not show up on the screen at all. "I don't need or want to see no stinking mouse cursor" :lol:

Thank you,
If you follow the instructions I listed in general, the important part is around

Code: Select all

xinit /home/pi/scripts/xinitrc — -nocursor

Re: Getting The Ur-quan Masters (Star Control 2) Working

Posted: Sat Jul 13, 2019 6:19 am
by leifdaniel
This post is pretty old now. I just got the Raspberry Pi 4 and I'd love to play Ur-Quan masters on it. Any chance you could update the instructions?