deveee
Posts: 4
Joined: Tue Oct 17, 2017 9:44 pm

Supertuxkart on Raspberry Pi

Tue Oct 17, 2017 10:08 pm

Hi,

I think that current git version (and upcoming 0.9.3 version) should work on Raspberry Pi. At least it works fine on Android devices with OpenGL ES renderer. The GLES renderer works also with mesa drivers on x86/x64 linux.

One thing that I'm not sure is if creating GLES context using EGL is enough to get hardware acceleration on RPi. It's probably true for vc4 driver, but I have no idea what about the proprietary one.

And second thing is that I'm not sure if STK will automatically fallback to legacy device (OpenGL ES 2.0), or maybe it will try to use GLES 3.0. AFAIK the Raspberry Pi GPU is only GLES 2.0. So if it will try to use GLES 3.0 (if no message about outdated/unsupported drivers), then something like this line should be added to graphical_restrictions.xml:

<card os="linux" disable="ForceLegacyDevice"/>


To enable GLES renderer in STK, you have to compile it with:

cmake .. -DUSE_GLES2=1

It would be nice if someone could test it, because currently I don't have access to any RPi device. And I can make some fixes before the 0.9.3 release.

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

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 8:10 am

Been waiting for this for a few years.
It would be cool, especially if the network multiplay works.
Get kids playing then coding their own karts and designing tracks.

I try to avoid playing this with the kid now, he laughs too much when he beats me every single time :(
However a networked game setup with a few more Pi's will impress his friends.
Mini game arcade in the basement? Google for plans time?

Warzone2100 is now working pretty good with the OpenGL the Pi has now, 0AD at least boots.
6? months ago both had trouble.

If I knew how to compile I would give it a try, time to learn?
If it does work sudo apt-get install supertuxkart next?

Good multiplayer games on Pi's are not that common.
Kids love Supertuxkart :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 8:41 am

I've built it from the latest code :

https://github.com/supertuxkart/stk-code

Unfortunately the game only gets as far as showing the 'loading clock' and the game characters across the bottom - then appears to lock up the Pi except for the mouse cursor.

Video : https://youtu.be/oZ3-Zslsox8

deveee
Posts: 4
Joined: Tue Oct 17, 2017 9:44 pm

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 9:58 am

Thanks a lot for testing!

Ok, so it at least created OpenGL ES context and shows some reasonable info in GL vendor/renderer/version.

You can try to disable HD textures and set lower textures size. This is what is set for Android by default. In ~/.config/supertuxkart/0.8.2/config.xml:

enable_high_definition_textures="0"
max_texture_size="256"

Or you can even set 128 for testing.

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

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 10:30 am

Adding those 2 settings worked :)

deveee
Posts: 4
Joined: Tue Oct 17, 2017 9:44 pm

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 11:39 am

That's great :)

Ok, so I will add these two params to graphical restrictions.

How much fps do you have in Hacienda or Cornfield Crossing?

I'm not sure what about "apt-get install supertuxkart". I think that using GLES for all arm devices in Debian repositories doesn't have a sense, because the GL renderer has more features and some devices may have proper OpenGL support. Maybe just create a ppa repository.

And not sure if you can check the proprietary driver and provide a log from console?

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

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 12:05 pm

Full screen at 1280x720, on my slightly overclocked Pi3, with Cornfield Crossing I'm getting FPS 19/30/52 (I guess that's min,current,max?)

stdout.log :

[info ] [FileManager]: Data files will be fetched from: '../../data/'
[info ] [FileManager]: Data files will be fetched from: '../../data/../../stk-assets/'
[info ] [FileManager]: User directory is '/home/pi/.config/supertuxkart/0.8.2/'.
[info ] [FileManager]: Addons files will be stored in '/home/pi/.local/share/supertuxkart/addons/'.
[info ] [FileManager]: Screenshots will be stored in '/home/pi/.local/share/supertuxkart/screenshots/'.
[info ] [FileManager]: User-defined grand prix will be stored in '/home/pi/.local/share/supertuxkart/grandprix/'.
[info ] [FileManager]: Asset 0 will be loaded from '../../data/challenges/'.
[info ] [FileManager]: Asset 1 will be loaded from '../../data/gfx/'.
[info ] [FileManager]: Asset 2 will be loaded from '../../data/grandprix/'.
[info ] [FileManager]: Asset 3 will be loaded from '../../data/gui/'.
[info ] [FileManager]: Asset 4 will be loaded from '../../data/../../stk-assets/library/'.
[info ] [FileManager]: Asset 5 will be loaded from '../../data/../../stk-assets/models/'.
[info ] [FileManager]: Asset 6 will be loaded from '../../data/../../stk-assets/music/'.
[info ] [FileManager]: Asset 7 will be loaded from '../../data/replay/'.
[info ] [FileManager]: Asset 8 will be loaded from '../../data/../../stk-assets/tracks/'.
[info ] [FileManager]: Asset 9 will be loaded from '../../data/../../stk-assets/sfx/'.
[info ] [FileManager]: Asset 10 will be loaded from '../../data/shaders/'.
[info ] [FileManager]: Asset 11 will be loaded from '../../data/skins/'.
[info ] [FileManager]: Asset 12 will be loaded from '../../data/../../stk-assets/textures/'.
[info ] [FileManager]: Asset 13 will be loaded from '../../data/ttf/'.
[info ] [FileManager]: Asset 14 will be loaded from '../../data/po/'.
[verbose ] translation: Env var LANGUAGE = 'en_GB.UTF-8'.
[verbose ] translation: Language 'English (Great Britain)'.
[warn ] tinygettext: jbo.po: warning: ignoring, unknown language
[warn ] tinygettext: no.po: warning: ignoring, unknown language
[warn ] tinygettext: no_NO.po: warning: ignoring, unknown language
[warn ] tinygettext: sc.po: warning: ignoring, unknown language
[warn ] tinygettext: sco.po: warning: ignoring, unknown language
[warn ] tinygettext: jbo.po: warning: ignoring, unknown language
[warn ] tinygettext: no.po: warning: ignoring, unknown language
[warn ] tinygettext: no_NO.po: warning: ignoring, unknown language
[warn ] tinygettext: sc.po: warning: ignoring, unknown language
[warn ] tinygettext: sco.po: warning: ignoring, unknown language
[info ] IrrDriver: OpenGL version: 2.1
[info ] IrrDriver: OpenGL vendor: Broadcom
[info ] IrrDriver: OpenGL renderer: Gallium 0.4 on VC4 V3D 2.1
[info ] IrrDriver: OpenGL version string: OpenGL ES 2.0 Mesa 13.0.6
[info ] GLDriver: EXT texture format BGRA8888 Present
[warn ] irr_driver: Driver doesn't support shader-based pipeline. Re-creating device to workaround the issue.
[info ] IrrDriver: OpenGL version: 2.1
[info ] IrrDriver: OpenGL vendor: Broadcom
[info ] IrrDriver: OpenGL renderer: Gallium 0.4 on VC4 V3D 2.1
[info ] IrrDriver: OpenGL version string: OpenGL ES 2.0 Mesa 13.0.6
[info ] GLDriver: EXT texture format BGRA8888 Present
[warn ] irr_driver: Using the fixed pipeline (old GPU, or shaders disabled in options)
[info ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/xml/news.xml
[info ] addons: Using cached addons.xml.
[info ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/image ... 517f49.png
[info ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/image ... 3e4cd1.jpg
[info ] GrandPrixManager: Loading Grand Prix files from ../../data/grandprix/
[info ] GrandPrixManager: Loading Grand Prix files from /home/pi/.local/share/supertuxkart/grandprix/
[warn ] OpenGL: OpenGL version is too old!
[verbose ] RaceManager: Nb of karts=4, ghost karts:0 ai:3 players:1

[warn ] material: Track uses deprecated texture 'redwhite.png'
[info ] Singleton: Destroyed singleton.
[info ] Singleton: Destroyed singleton.
[info ] Singleton: Destroyed singleton.
[info ] Singleton: Destroyed singleton.

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

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 12:53 pm

SuperTuxKart running at 1280x720 on my Pi3 :

https://youtu.be/fPd2G_qc_jk

deveee
Posts: 4
Joined: Tue Oct 17, 2017 9:44 pm

Re: Supertuxkart on Raspberry Pi

Wed Oct 18, 2017 8:01 pm

Ok, now I force max texture size <= 256 for Raspberry Pi:
https://github.com/supertuxkart/stk-cod ... 9b4ec953bd

So now it should work without any additional modifications.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 8 guests