SRB2 Kart on RetroPie
-
Do you think you could help me out and make an easy version for me to be able to install? As I really have no idea what I'm doing and would love this game on my Retropie, I just can't figure any of this out. If you could I would appreciate it so much!
-
@RennyC What exactly did you edit in CMakeList.txt? Im getting an error about not being able to find the srb2.srb and the srb2.dat files. So im not sure whats going on, any help would be much appreciated.
-
@dredge323 said in SRB2 Kart on RetroPie:
Do you think you could help me out and make an easy version for me to be able to install? As I really have no idea what I'm doing and would love this game on my Retropie, I just can't figure any of this out. If you could I would appreciate it so much!
Who are you asking for help?
Me or OP in this thread?
-
@dredge323 You need the srb2.srb file, also I edited CMakeList.txt in the asset folder and changed .dta to .kart on one of the files. I forget which one exactly but it shouldn't be hard to figure out either.
-
@tpo1990 said in SRB2 Kart on RetroPie:
Great. Good work. Now all is left to do is to make it easier to install into RetroPie. Maybe an install script and then added into the RetroPie Ports as an option just like SRB2.
Thank you for your effort. :-)
This so much. Would be awesome! :)
-
@squidgy617 said in SRB2 Kart on RetroPie:
Sure enough, it runs swimmingly.
I wouldn't say it runs swimmingly. Sure, it seems to run free of bugs and fully featured, but you have to run it on the lowest resolution to get an acceptable frame rate. I tried overclocking my 3b+ just to see if I could get it to run. It runs most PSP and N64 titles without problem now but still require lowest resolution to run SRB2K.
So I am slightly disappointed since it is a pretty fun game.
-
wait... whats the main download? there are 4 downloads, windows 32-bit, 32-bit patch version, windows 64-bit, and the patch version of that.
-
@Awesomegamer656 For this case, "Full Install" is what you want, as it contains all the necessary files for compilation. Bit type doesn't appear to matter too much, since I believe .kart files are the same across both versions.
The way I compiled SRB2kart for my Pi was this:
sudo git clone https://github.com/STJr/Kart-Public.git
- Create a folder named "build"
- Download SRB2Kart to my main PC
- Retrieve all the .kart files from that download
- Copy them over to the build folder
- Open the terminal, navigate to the build folder, and run these commands:
sudo cmake .. -DCMAKE_BUILD_TYPE=Release sudo make -j4
The process is more-or-less identical to SRB2's setup script, the only major difference is the files that must be downloaded for compilation. As RetroPie currently uses a self-hosted .tar.gz that contains the required files, a setup script for SRB2kart would require a similar .tar.gz to be created and self-hosted.
Once you do get it compiled, I'd also recommend setting the resolution in-game to 640x400 or below. The default resolution chugs pretty hard on a Pi, even on simple courses. (and you'd have to reduce this further if you want to get split-screen multiplayer involved; overclocking the Pi does appear to help somewhat with this)
Do note that I tested all this on a Pi 4 running Raspbian Buster, with a desktop and default settings; this likely isn't optimal for this specific game.
Addendum (September 4, 2019)
I dug around the srb2kart cmake files, and it turns out that my method is not technically the intended way to compile srb2kart; it just happened to work out for me. Here's a slightly amended, much more verbose guide on how to compile srb2kart:
- Open a terminal window (whether it be on the Pi itself, or an SSH client such as PuTTY)
- Run the command
sudo git clone https://github.com/STJr/Kart-Public.git
, to download the game's source code (I will be assuming you run this in/home/pi/RetroPie-Setup/tmp/build
, just like a setup script would do) - Download and install a release of SRB2Kart to your main PC
- Retrieve all the .kart files from the game's files (they should be in the same directory as
srb2kart.exe
) - Navigate to the directory
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/assets
- Create a new folder there, named
installer
- Copy the .kart files over to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/assets/installer
- Navigate back to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public
- Create a folder named
build
- Navigate to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/build
, and run these two commands:
sudo cmake .. -DCMAKE_BUILD_TYPE=Release sudo make -j4
- The resulting executable will be named
srb2kart
, located in/home/pi/RetroPie-Setup/tmp/build/Kart-Public/build/bin
.
-
@SuperFromND
I tried to install it on my RPi4, but still horrible gameplay. Did you tweak anything to get better performance?
I tried reducing draw distance and resolution, but that did not make the game playable. -
@SuperFromND said in SRB2 Kart on RetroPie:
@Awesomegamer656 For this case, "Full Install" is what you want, as it contains all the necessary files for compilation. Bit type doesn't appear to matter too much, since I believe .kart files are the same across both versions.
The way I compiled SRB2kart for my Pi was this:
sudo git clone https://github.com/STJr/Kart-Public.git
- Create a folder named "build"
- Download SRB2Kart to my main PC
- Retrieve all the .kart files from that download
- Copy them over to the build folder
- Open the terminal, navigate to the build folder, and run these commands:
sudo cmake .. -DCMAKE_BUILD_TYPE=Release sudo make -j4
The process is more-or-less identical to SRB2's setup script, the only major difference is the files that must be downloaded for compilation. As RetroPie currently uses a self-hosted .tar.gz that contains the required files, a setup script for SRB2kart would require a similar .tar.gz to be created and self-hosted.
Once you do get it compiled, I'd also recommend setting the resolution in-game to 640x400 or below. The default resolution chugs pretty hard on a Pi, even on simple courses. (and you'd have to reduce this further if you want to get split-screen multiplayer involved; overclocking the Pi does appear to help somewhat with this)
Do note that I tested all this on a Pi 4 running Raspbian Buster, with a desktop and default settings; this likely isn't optimal for this specific game.
Addendum (September 4, 2019)
I dug around the srb2kart cmake files, and it turns out that my method is not technically the intended way to compile srb2kart; it just happened to work out for me. Here's a slightly amended, much more verbose guide on how to compile srb2kart:
- Open a terminal window (whether it be on the Pi itself, or an SSH client such as PuTTY)
- Run the command
sudo git clone https://github.com/STJr/Kart-Public.git
, to download the game's source code (I will be assuming you run this in/home/pi/RetroPie-Setup/tmp/build
, just like a setup script would do) - Download and install a release of SRB2Kart to your main PC
- Retrieve all the .kart files from the game's files (they should be in the same directory as
srb2kart.exe
) - Navigate to the directory
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/assets
- Create a new folder there, named
installer
- Copy the .kart files over to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/assets/installer
- Navigate back to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public
- Create a folder named
build
- Navigate to
/home/pi/RetroPie-Setup/tmp/build/Kart-Public/build
, and run these two commands:
sudo cmake .. -DCMAKE_BUILD_TYPE=Release sudo make -j4
- The resulting executable will be named
srb2kart
, located in/home/pi/RetroPie-Setup/tmp/build/Kart-Public/build/bin
.
I'm still noob enough for the more intricate stuff of Linux and Retropie in general. I was able to follow this and finish the build of the files with the resulting files. However I have no idea how to launch it. By running the srb2kart-1.1.0 from the file manager, I get a few messages about the game and that srb2.wad is missing, and then it won't start. The other resulting file, srb2kart, seems to do the same. They are looking for the srb2.srb file in weird places. Do I have to move the whole build folder somewhere else??
Also, How can I make a link to it in the ports tab?
-
@Yanazake
I just added the following manuallyroms/ports/SRB2K.sh
#!/bin/bash /home/pi/repos/Kart-Public/build/bin/srb2kart #path to your compiled binary
and then I ran my scraper to regenerate the game list.
-
Man, i wish there was a script that would do this.
-
Heya folks! It's been quite a while since this post has had any activity, but I figured I should post an update since:
A. SRB2Kart released an update, v1.2.
B. RetroPie released a build for the Pi 4.
C. I wanted to write a better guide for installing this using an easier method, since it doesn't appear the PR I submitted will be accepted any time soon.So without further ado, here's my new guide on installing SRB2Kart on the Pi!
What You'll Need
Note that this is simply what I'm using for this guide. I'd recommend using these to be able to follow along most easily, but similarly-capable tools and programs should allow you to get to the same result; just with a slightly different workflow.
- SRB2Kart's .kart files These are needed during the compilation process as well as to play the game, but since neither SRB2 nor the RetroPie project are hosting these files directly, we'll need to set up a simple HTTP server to essentially "emulate" this process.
- PuTTY. This will be used to run the aeformentioned HTTP server in the background.
- WinSCP. This will be used to copy over a scriptmodule to the necessary directory, as well as the .kart files from earlier.
- This scriptmodule. This will be what you run to compile and install SRB2Kart. Do note that this script WILL NOT WORK until you host the HTTP server, as it looks at
localhost:8000
instead of trying to connect to the RetroPie file archive.
Instructions
The basic idea of the installation process is as follows:
- Download some asset files needed during compilation and for the game to run
- Host a local web server with the asset files, to mimic how an "official" port would get files from the RetroPie file archive
- Install a custom scriptmodule and run it to install the game
With this basic outline in mind, let's begin!
Step 1: File Setup
First things first: Open up WinSCP and log into your Pi.
We're going to copy the custom scriptmodule into the directory that RetroPie reads scriptmodules of ports from. The directory for this is
/home/pi/RetroPie-Setup/scriptmodules/ports
; you can either navigate to that folder by just clicking on each folder in the path in order, or alternatively copy the above path into the "Address" bar and hit Enter to jump straight to it. From here, simply drag the scriptmodule,srb2kart.sh
, into the folder.We're now going to need to create a temporary directory to host the .kart files. The exact location of this directory doesn't really matter too much as long as it doesn't conflict with any directory used during compilation or installation. In WinSCP, you do this by navigating to your directory of choice, and then either right-clicking and then going to New -> Directory, or simply by pressing Ctrl-D. I'll be creating my directory on a USB stick I have plugged into my Pi, creating the path
/media/usb0/temp
. Once this directory has been created, drag thesrb2kart-assets.tar.gz
file archive into that directory.That's all that we'll need regarding files. You can now close WinSCP.
Step 2: Local Server Setup
It's now time to host a simple HTTP server. This server must be running when you run the scriptmodule, as it locally hosts the
srb2kart-assets.tar.gz
file archive that is necessary for compiling and running the game. This mimics the behavior that many RetroPie ports, including parent game Sonic Robo Blast 2, uses for it's installation procedure: that is, connecting to RetroPie's web-hosted file archive to download assets needed for compilation.Open up PuTTY and log into your Pi. We're going to need to navigate to the location that the file archive is located in. This can be achieved with the following command, where
/path/to/assets/
is your file path:cd /path/to/assets
To verify that you're in the right directory, run this command:
ls
This will list the contents of the directory you are currently in. If you see
srb2kart-assets.tar.gz
, that means you're in the right directory and can move on.RetroPie's distribution includes the
python
library installed by default, so we're gonna make use of it's built-in moduleSimpleHTTPServer
to host our files locally. This can be done with the following command:python -m SimpleHTTPServer 8000
If you did the command correctly, you should see the text
Serving HTTP on 0.0.0.0 port 8000...
appear. Make sure that you don't close PuTTY at this point, as doing so will terminate the server.Step 3: Installation
Now that we have our local server running, we can run the scriptmodule to install the game. Within EmulationStation, navigate to the RetroPie icon, and then to RetroPie Setup. Once Retropie Setup has loaded, go to Manage Packages, then Manage experimental packages, and scroll down until you see
srb2kart
listed. Select it and then install it; it may take a few minutes depending on your exact hardware. Once it's done installing, exit RetroPie Setup and restart EmulationStation.If you did everything correctly, you should see a new section on RetroPie named Ports (assuming you dont have any ports installed already), with "Sonic Robo Blast 2 Kart" listed as an option. Launch it like any other game, and if all goes well, you should see the Kart Krew logo appear followed by the game's title screen.
Controls
The default controls are as follows:
Left Analog Stick - Move Left/Right
A Button - Accelerate
B Button - Reverse
X Button - Look Back
Right Trigger - Break
Left Trigger - Use Item
D-Pad Up - Disable HUD (must be held down, it's not a toggle)
Start - Pause Menu
Select - Restart RaceYou can rebind these to your preferences in Options -> Controls Setup. I haven't tested any controllers besides my Rock Candy X360 Controller, so I can't say much in terms of getting certain popular controllers (namely PlayStation controllers and the Logitech F310) to work.
Performance Tweaks
I would strongly recommend turning down the game's resolution. By default, it's set to 1280x800, which performs pretty badly on the Pi 4 since the game uses a software-based renderer. I've found that 640x400 gives pretty good performance; just make sure that you set the default resolution to be 640x400 by pressing A twice on the option so that you don't have to manually set this every time you start the game.
It might be possible to compile the game to use OpenGL instead of a software-renderer via the-opengl
flag to get vastly improved performance, but I haven't tested this, and Github user jw0z96 didn't have much luck with it.
EDIT: I was able to get it to run with OpenGL; unfortunately it performs worse than software-rendered mode so it's not worthwhile.It might also be possible to improve performance by messing with the Draw Distance and Weather Draw Distance parameters, but I haven't found much (if any) performance benefits from changing these settings.
Add-ons
The default locations that SRB2Kart will search for addons in is
/home/pi/.srb2kart
. You can simply drag and drop either .wad or .pk3 files into this directory. I would recommend creating a subdirectory to keep your add-ons in, just to keep things better organized.Add-ons downloaded from playing online will be saved to
/home/pi/.srb2kart/DOWNLOAD
.If you want to automatically load add-ons when starting the game, create a new file in
/home/pi/.srb2kart
namedkartexec.cfg
. To tell it what add-ons to load, write the commandaddfile
followed by the path and filename of whatever file you want to load.For example, let's say that I have
KC_Example.pk3
in a directory I created,/home/pi/.srb2kart/addons
. The command I would write to load this file would be the following:addfile addons/KC_Example.pk3
Since SRB2Kart defaults to
/home/pi/.srb2kart/
, it assumes this is a relative path and then looks for/home/pi/.srb2kart/addons/KC_Example.pk3
.To add more add-ons, simply duplicate this line for every file you want to include. Do note that, with a lot of addons, you will need a Pi with sufficiently large amounts of RAM to hold all of those add-ons in memory.
Do also note that, if you plan to join a multiplayer server with add-ons, they must be loaded in the same order that the server host loaded them in, else you will not be able to join. The best way to deal with this problem is to simply not have any add-ons loaded when joining the server, as SRB2Kart can automatically download and enable the addons in the correct order.
That should cover just about everything that you'd want to know regarding getting SRB2Kart on RetroPie. Eventually, I want to make a video version of this guide, so that it'll be even easier to follow along. I hope that eventually SRB2Kart can get properly implemented into RetroPie so that this whole installation method becomes obsolete, but until then I hope that you were able to follow along with this guide. Happy karting!
-
@SuperFromND WOOOOOOOOOOOOOOOOOOOOOOOOO!!! FINALLY!
-
@SuperFromND This is a damn nice tutorial and should be a thread on its own, in my opinion. Good work and thanks (even tho I do not play this game on the Pi).
-
Hello i just followed along eveything seem to install but when starting srb2k i get configurement not found.
-
Just like to let you know i have srb2 2.2.8 and srb2k 1.3 install all working online thanks to the two that posted two different install methods. From both of them. I lernt alot and now on github have both srb2 and srb2k sauce files upload. Ive all so reedited the .sh so it makes it really easy for me to update both games.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.