User avatar
PokeEngineer
Posts: 23
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

OneShot on the Raspberry Pi 2 & 3

Wed Apr 12, 2017 10:28 pm

After a couple of days working on this, I have managed to get OneShot (the Steam version) working full speed on the Raspberry Pi using the experimental OpenGL driver. :D

*DISCLAIMER*: I have only tested this on a Raspberry Pi 3, so this might be a little slower on a Raspberry Pi 2.

Step 1: Install needed packages:

- Update repository list

Code: Select all

sudo apt-get update
- Install dependencies

Code: Select all

sudo apt-get -y install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libvorbis-dev libboost-dev libboost-program-options-dev qt5-default libsigc++-2.0-dev libbison-dev libopenal-dev libpixman-1-dev autoconf mercurial cmake libtool imagemagick libxcb-icccm4-dev libxcb-ewmh-dev xcb libxcb-image0-dev libxcb-shape0-dev libxcb-util0-dev
- Clone PhysicsFS

Code: Select all

hg clone https://hg.icculus.org/icculus/physfs/
- cd into the directory
- Download my patch

Code: Select all

wget https://raw.githubusercontent.com/PokeEngineer/OneShot-RPI/master/patch.diff
- Apply my patch

Code: Select all

hg import patch.diff
- Run CMake

Code: Select all

cmake .
- Make the project

Code: Select all

make
- Install the project

Code: Select all

sudo make install
- cd out of the directory
- Clone this fork of SDL_sound

Code: Select all

git clone https://github.com/Ancurio/SDL_sound.git
- cd into the directory
- Run ./bootstrap

Code: Select all

./bootstrap
- Configure the Makefile

Code: Select all

./configure
- Make the project

Code: Select all

make
- Install the project

Code: Select all

sudo make install
Now, cd out of the directory for the next step.


Step 2: Use my script that will handle stuff from here on out:

- Clone the script repository

Code: Select all

git clone https://github.com/PokeEngineer/OneShot-RPI.git
- cd into the directory
- Run the script

Code: Select all

./install.sh
Once the above is finished, cd out of the directory and now you can delete the folders, physfs, SDL_sound, and OneShot-RPI.


Step 3: Copy the OneShot data:

Next, copy the folders, Audio, Data, Fonts, Graphics, Wallpaper, and the files, CREDITS.txt and README.txt, from your OneShot Steam folder to ~/OneShot.


Step 4: Enable the OpenGL driver:

- Open Raspi-Config

Code: Select all

sudo raspi-config
Go to Advanced Options > GL Driver > GL (Full KMS) > Ok
And now, select Finish > Yes to reboot


Step 5: Play!:

- cd into the OneShot folder in ~/
And finally type

Code: Select all

./oneshot
to launch OneShot and

Code: Select all

./journal
to launch the OneShot Journal.
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

DatKiko
Posts: 5
Joined: Fri Apr 27, 2018 7:18 pm

Re: OneShot on the Raspberry Pi 2 & 3

Fri Apr 27, 2018 7:23 pm

When I try to install your patch, it says Error: 404 not found :/

User avatar
PokeEngineer
Posts: 23
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 12:17 am

Hey @DatKiko, I will get to your issue when I can, my PC is on the fritz right now, and I'm a bit busy.
Last edited by PokeEngineer on Sat Apr 28, 2018 2:23 pm, edited 1 time in total.
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

DatKiko
Posts: 5
Joined: Fri Apr 27, 2018 7:18 pm

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 1:21 pm

Im sorry, I was typing it out wrong, and i succesfully downloaded it
But my issue is that when I hg import patch.diff, i says "no repoitory found"

DatKiko
Posts: 5
Joined: Fri Apr 27, 2018 7:18 pm

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 1:23 pm

Also I can clearly see it on the pi/home in the folder, so is there something im missing?

B.Goode
Posts: 5800
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 1:37 pm

DatKiko wrote:
Sat Apr 28, 2018 1:23 pm
Also I can clearly see it on the pi/home in the folder, so is there something im missing?
If you have followed the instructions accurately patch.diff should have been downloaded to the directory ~/physfs, and that directory should be your Current Working Directory.

DatKiko
Posts: 5
Joined: Fri Apr 27, 2018 7:18 pm

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 3:07 pm

I tried to do it once again, but with no success, so I reinstalled the whole raspbian and followed the guide again, but with no success again, the atch was still where it was before, in the home/pi folder. How can I fix this issue?

B.Goode
Posts: 5800
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 3:32 pm

DatKiko wrote:
Sat Apr 28, 2018 3:07 pm
I tried to do it once again, but with no success, so I reinstalled the whole raspbian and followed the guide again, but with no success again, the atch was still where it was before, in the home/pi folder. How can I fix this issue?

Maybe the instructions are not quite precise enough, and rely on a little basic understanding of Linux file management.

Expanding a little - original text like this

- Clone PhysicsFS

Code: Select all

hg clone https://hg.icculus.org/icculus/physfs/
[You have probably already done this. If successful there should be a new directory physfs in your home directory.]

- cd into the directory

[ This might be the step you are missing. It is shorthand for cd into the new directory created in the previous step.]

Code: Select all

cd physfs
- Download my patch

Code: Select all

wget https://raw.githubusercontent.com/PokeEngineer/OneShot-RPI/master/patch.diff
[ You should now have patch.diff in the directory ~/physfs ]

- Apply my patch

Code: Select all

hg import patch.diff

B.Goode
Posts: 5800
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 4:30 pm

Unfortunately, you will probably find that the application of the patch will fail:

Code: Select all

pi@RPi3office:~/physfs $ hg import patch.diff
applying patch.diff
unable to find 'src/archiver_zip.c' for patching
(use '--prefix' to apply patch relative to the current directory)
1 out of 1 hunks FAILED -- saving rejects to file src/archiver_zip.c.rej
abort: patch failed to apply
pi@RPi3office:~/physfs $ 
The patch appears to be incompatible with the source tree cloned from the icculus.org repository - you will need seek advice from @pokengineer about this.

(I can see a file in the src directory with a similar name and would be tempted to edit that file by hand to make the changes in the patch file, but that is a "hacker's" solution... )

User avatar
PokeEngineer
Posts: 23
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 4:34 pm

Seems like the repo was updated and the patch broke. I will see if I can update the patch when I have time.
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

User avatar
PokeEngineer
Posts: 23
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 4:59 pm

@DatKiko, It's

Code: Select all

cd ..
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

B.Goode
Posts: 5800
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 5:23 pm

PokeEngineer wrote:
Sat Apr 28, 2018 4:59 pm
@DatKiko, It's

Code: Select all

cd ..
I don't want to argue with you in public, because it is your tutorial, but I thought I had demonstrated that it was necessary to cd into the cloned directory tree? (Because hg import only makes sense in a directory that is under hg version control.)

User avatar
PokeEngineer
Posts: 23
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

Re: OneShot on the Raspberry Pi 2 & 3

Sat Apr 28, 2018 5:48 pm

I don't want to argue with you in public, because it is your tutorial, but I thought I had demonstrated that it was necessary to cd into the cloned directory tree? (Because hg import only makes sense in a directory that is under hg version control.)
Oh, I was just helping out @DatKiko because he asked in a post (which is now gone, for some reason) how to cd out of a directory.
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

DatKiko
Posts: 5
Joined: Fri Apr 27, 2018 7:18 pm

Re: OneShot on the Raspberry Pi 2 & 3

Thu May 03, 2018 4:27 pm

I deleted the post in which i was asking about the "cd" command, because I didnt read the "cd out of the directory", and when I posted the post, I saw the point when I was reading the guide again. So I am very sorry.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 5 guests