User avatar
Gavinmc42
Posts: 3926
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Oct 19, 2018 12:48 am

It worked pretty much first time and I am really impressed how good it runs! Congrats and thanks to the dev team for making is so portable!
Cool, nice to know it ports without major trouble now
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: Supertuxkart on Raspberry Pi

Mon Oct 22, 2018 8:48 pm

Hi,

I've been looking at compiling this, the first thing I found was that with make -j4 I ran out of memory, even with -j3 it would start to swap, -j2 worked OK.

Having compiled and installed, when I run the game I get a notification that my OpenGL is too old, it needs ES 3.0 or better.. Have I done something wrong? The game runs but is a bit choppy..

I used

Code: Select all

cmake .. -DUSE_GLES2=1


and and put <card os="linux" disable="ForceLegacyDevice"/> in /usr/local/share/supertuxkart/datagraphical_restrictions.xml

Any ideas ?

Ta :)

User avatar
rpiMike
Posts: 962
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 6:26 am

Have you enabled the GL Driver in raspi-config ?

itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:05 pm

Hi,

Thanks for the quick reply, its appreciated.

The driver is enabled and appears to be working OK, glxgears runs at 60fps, and oolite plays fine..

From my config.txt

Code: Select all

dtoverlay=vc4-kms-v3d
gpu_mem=256
Should datagraphical_restrictions.xml have been edited before I compiled the game ?

EDIT:-

I think I have found the answer, I found this when hitting google, glxinfo in the Pi shows version 1.4
Since STK 0.9 we use new rendering engine that requires OpenGL 3.1 or higher
Maybe I should try and compile and older version....
Last edited by itsmedoofer on Tue Oct 23, 2018 5:17 pm, edited 1 time in total.

User avatar
rpiMike
Posts: 962
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:16 pm

Edit: Don't think datagraphical_restrictions.xml needed editing
Last edited by rpiMike on Tue Oct 23, 2018 5:39 pm, edited 1 time in total.

itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: Supertuxkart on Raspberry Pi

Tue Oct 23, 2018 5:31 pm

Is that you dont think the newer code is a fault ?

Edit:- Ah :)

EliCash
Posts: 2
Joined: Thu Jul 11, 2019 11:34 pm

Re: Supertuxkart on Raspberry Pi

Thu Jul 11, 2019 11:52 pm

Hi, first-timer here with not much technical knowledge going in. After doing the "light an LED" tutorial I wanted to install SuperTuxKart.

My first attempt was to just use:

Code: Select all

sudo apt-get install supertuxkart
Which KINDA worked, except that it gets hung on the loading screen until it quits the program. From this thread, I assumed I therefore needed to make tweaks to the code yet couldn't find it. That made me think I needed to "build from source" from github. So I cloned it. Eventually I figured out how to do install subversion and then grab the STK assets.

I got errors from the "dependencies" section of the documentation no matter which option I chose (do I need to install "Ubantu" or "Fedora"? I don't know what these things are...), so I moved ahead to compiling. However, when I ran "sudo cmake .." or "cmake .." I got a similar error message:

Code: Select all

-- No build type selected, default to STKRelease
-- Checking for module 'libenet>=1.3.4'
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.7/Modules/FindJPEG.cmake:32 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:193 (find_package)
(With no "sudo" there I got )

I thought maybe it had to do with the dependencies so I tried individually installing them but couldn't figure out how to do that, either. I did sudo apt install libgles2-mesa-dev libegl1-mesa-dev after seeing it on this thread, too. Thoughts?

User avatar
Gavinmc42
Posts: 3926
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 1:08 am

SuperTuxKart is OpenGL based.
It installs fine on a Pi4, it does pop up a warning but it still runs fine.
Not sure which version it is and more fine tuning would probably make it work better.

The Pi4 Buster is OpenGL all the way down.
More games now just install and work, some don't quite yet like 0AD and Warzone2100 is weird on big maps.

Trigger Rally works too.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

EliCash
Posts: 2
Joined: Thu Jul 11, 2019 11:34 pm

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 2:58 am

I've got a Raspberry Pi 3 B+. So is that why it won't run and quits on startup? Folks earlier in this thread got it going...

And my project is to create some external controllers for the game, rather than mouse/keyboard. To do that I think I'm going to need to access code for "fine tuning." If I'm not downloading it from GitHub and editing it, and just running it from what comes loaded, how do I access the code? Not asking to walk me through it but if there's a direction you can point of where to read more it'd be super helpful. Thanks

User avatar
Gavinmc42
Posts: 3926
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 5:02 am

The 3B+ uses the VC4 and does not default to OpenGL
The 4B uses the VC6 and does default to OpenGL.

The 4 is so much faster/better and more stuff like OpenGL games just install/work.
Not perfect but I noticed after one update/upgrade SuperTuxKart was even better.

I tried compiling it in Gentoo64 on a 3B+ as that OS is OpenGL too.
Nope, too hard for me.

I will be getting a 4B4 so I can then mess about with skinning karts, making maps etc.
The Tux Kart engine is used in other things, like AR/VR.

I have used Microbits via BT talking to Pi's.
Adafruit library for Arduino IDE.
Have not tried with the new BT5.0 on the Pi4 yet.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jdonald
Posts: 417
Joined: Fri Nov 03, 2017 4:36 pm

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 11:25 am

EliCash what’s the version that comes from the Apt repository? If that’s still 0.8.2 then it won’t work and yes you’ll have to build from source.

The working 30 FPS Pi 3/3B+ config discussed here must be built with -DUSE_GLES2=1, but note this is Mesa GLES so it requires the open-source driver. That’s the same driver as “full OpenGL” so make sure to run:

Code: Select all

    sudo raspi-config
And select that driver as mentioned above.

As for your cmake error, that last line says it couldn’t find libjpeg, so try:

Code: Select all

    sudo apt install -y libjpeg-dev
There are a few other dependencies so you’ll probably have to continually troubleshoot in the same way.

User avatar
Gavinmc42
Posts: 3926
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Fri Jul 12, 2019 11:43 am

You should try it on a Pi4 :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

QwertyChouskie
Posts: 3
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Tue Jul 16, 2019 9:23 pm

Here's the low down on SuperTuxKart support on the Raspberry Pi:

On any hardware, make sure you have the full GL driver (known as the VC4 or V3D Mesa driver) selected in raspi-config. It is NECESSARY to do this step, STK will not work using the legacy drivers, instead defaulting to software rendering (<1FPS). Note that the RPI4 should have the full GL driver selected by default.

V3D supports GL 2.1 and GLES 2.0 on the Pi 3B+ and below; and supports GL 2.1 and GLES 3.0 on the PI 4. Eventually the V3D driver should support GL 3.x on the Pi 4, but it doesn't yet.

SuperTuxKart uses the legacy renderer when GL 2.1/GLES 2.0 is available, and the modern renderer when GL 3.3/GLES 3.0 is available. Whether STK uses GL or GLES is selected at compile-time.

If you are on Raspbian Buster, it includes STK version 0.9.3 in the repos, presumably built to use the GL renderer. It should work out of the box with "sudo apt install supertuxkart", as the V3D provides desktop GL 2.1, and 0.9.3 includes the necessary graphical restriction (https://github.com/supertuxkart/stk-cod ... 9b4ec953bd). You will get an old driver warning on startup, but it should otherwise work fine.

If you manually compile version 1.0 or newer, or install it from a PPA (https://launchpad.net/~stk/+archive/ubuntu/dev), it should detect it is being compiled on an ARM device and default to the GLES renderer. *There is no need to use the -DUSE_GLES=1 option when compiling STK on the Pi anymore, it is now automatic.* (This auto-detection at compile-time was added in this commit: https://github.com/supertuxkart/stk-cod ... fc945731dd) This means that when using it on the Pi 4, it *should* use the modern renderer, and support goodies like dynamic lighting (known in-settings as the Advanced Pipeline, option is selectable even when using the legacy renderer, but will only actually do anything with the modern renderer).

How well STK performs on the Pi 4 when enabling dynamic lighting and such is the big question, as this definitely takes more processing power, but makes STK look significantly nicer. I'd love to hear some test results if someone is willing to test.

Installing version 1.0 from the PPA should be as simple as adding "deb http://ppa.launchpad.net/stk/dev/ubuntu disco main" "deb http://ppa.launchpad.net/stk/dev/ubuntu cosmic main" (updated as previous was wrong) to your sources.list and running "sudo apt update && sudo apt install supertuxkart" so long as you are on Raspbian Buster. If you are on an earlier version of Raspbian, I recommend upgrading for simplicity's sake.
Last edited by QwertyChouskie on Wed Jul 17, 2019 11:08 pm, edited 1 time in total.

User avatar
Gavinmc42
Posts: 3926
Joined: Wed Aug 28, 2013 3:31 am

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 1:46 am

If you are on Raspbian Buster, it includes STK version 0.9.3 in the repos, presumably built to use the GL renderer. It should work out of the box with "sudo apt install supertuxkart", as the V3D provides desktop GL 2.1, and 0.9.3 includes the necessary graphical restriction (https://github.com/supertuxkart/stk-cod ... 9b4ec953bd). You will get an old driver warning on startup, but it should otherwise work fine.
I can confirm it works after the install on a Pi4 with Buster and there is that warning.
Gave it to the kid are try, he had no complaints about response speed.

The new 1.0 will be interesting, how hard will it will push the Pi4?
STK has been a stress test benchmark for Pi's for me for years.
Now it works, well the version in the repo anyway :D

Will be interesting when netbooting is working on the Pi4.
Network gaming ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 2:26 pm

QwertyChouskie wrote:
Tue Jul 16, 2019 9:23 pm

Installing version 1.0 from the PPA should be as simple as adding "deb http://ppa.launchpad.net/stk/dev/ubuntu disco main" to your sources.list and running "sudo apt update && sudo apt install supertuxkart" so long as you are on Raspbian Buster. If you are on an earlier version of Raspbian, I recommend upgrading for simplicity's sake.
Not quite as easy as that, having added the repository, trying to install gives me:-

Code: Select all

The following packages have unmet dependencies:
 supertuxkart : Depends: libc6 (>= 2.29) but 2.28-10+rpi1 is to be installed
E: Unable to correct problems, you have held broken packages.
Nothing appears broken though.

Code: Select all

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Not going to try too hard as the version in the Rasbian Repo works great ..

QwertyChouskie
Posts: 3
Joined: Fri Jun 28, 2019 10:08 pm

Re: Supertuxkart on Raspberry Pi

Wed Jul 17, 2019 11:05 pm

Maybe instead try "deb http://ppa.launchpad.net/stk/dev/ubuntu cosmic main" instead in sources.list (making sure to remove the old line and run "sudo apt update" before trying re-installation). I was guessing at the Ubuntu version -> Debian/Raspbian version mapping, guess I got it wrong. :)

Return to “Gaming”