New supertuxkart on odroid xu4

Moderators: mdrjr, odroid

New supertuxkart on odroid xu4

Unread postby rondnelson » Mon Dec 18, 2017 8:29 am

I just got a new odroid xu4 yesterday, and i saw supertuxkart was released on android recently, so it now has an opengl es renderer. This brand new renderer works on Linux too if you pass a an argument (-DUSE_GLES2=1) when you use cmake to compile it. Someone already got this to work on the raspberry pi: https://www.raspberrypi.org/forums/view ... p?t=195612
I think, if it runs on the raspberry pi, the XU4 can do it a thousand times better.

So, i went to compile it.
I am using meveric's debian jessie minimal image, with MATE desktop via setup-odroid script. I downloaded the current source code, installed a bunch of dependencies, and it compiled almost perfectly, just a few unused variables and such.

When i went to run it, the program runs into an error without even going to the startup screen, this is the output:
Code: Select all
[verbose  ] main: Error messages and other text output will be logged to /home/odroid/.config/supertuxkart/0.8.2/stdout.log.
[info   ] [FileManager]: Data files will be fetched from: '../../data/'
[info   ] [FileManager]: User directory is '/home/odroid/.config/supertuxkart/0.8.2/'.
[info   ] [FileManager]: Addons files will be stored in '/home/odroid/.local/share/supertuxkart/addons/'.
[info   ] [FileManager]: Screenshots will be stored in '/home/odroid/.local/share/supertuxkart/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in '/home/odroid/.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/library/'.
[info   ] [FileManager]: Asset 5 will be loaded from '../../data/models/'.
[info   ] [FileManager]: Asset 6 will be loaded from '../../data/music/'.
[info   ] [FileManager]: Asset 7 will be loaded from '../../data/replay/'.
[info   ] [FileManager]: Asset 8 will be loaded from '../../data/tracks/'.
[info   ] [FileManager]: Asset 9 will be loaded from '../../data/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/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_US.UTF-8'.
[verbose  ] translation: Language 'English (United States)'.
Adding language fallback en
Irrlicht Engine version 1.8.0
Linux 3.10.106+ #1 SMP PREEMPT Fri Nov 24 16:26:38 CET 2017 armv7l
[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[fatal  ] irr_driver: Couldn't initialise irrlicht device. Quitting.


rondnelson
 
Posts: 4
Joined: Thu Jan 19, 2017 11:26 am
languages_spoken: english
ODROIDs: C2

Re: New supertuxkart on odroid xu4

Unread postby odroid » Mon Dec 18, 2017 2:05 pm

Quite interesting project. I wanted to play STK with HD texture via OpenGL-ES 3.0 instead of GLSHIM on XU4 too.
But I have the same error message on Ubuntu.

I think it still has an issue with OpenGL-ES2.
According to the RPi log, it seems to be still using OGL instead of GLES2.
I hope meveric has time slot to check it. :)
User avatar
odroid
Site Admin
 
Posts: 25823
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: New supertuxkart on odroid xu4

Unread postby meveric » Mon Dec 18, 2017 5:35 pm

I'll see what I can find out.
STK uses "Irrlicht" as a 3D engine.
Irrlicht has OpenGL ES backend for quite some time, I guess they finally updated their hacked Irrlicht engine to support OpenGL ES as well.
I'll try to get it to work, but no promises ;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8105
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: New supertuxkart on odroid xu4

Unread postby meveric » Tue Dec 19, 2017 6:04 pm

I currently run into the same issues as @rondnelson.
Compiling is fine, but you can't start it.
This is probably taking way longer as compiling in debug mode doesn't work either.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8105
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: New supertuxkart on odroid xu4

Unread postby AreaScout » Wed Dec 20, 2017 2:41 am

Hi All

Chance \home\odroid\stk-code\lib\irrlicht\source\Irrlicht\CIrrDeviceLinux.cpp line number 908 from:

Code: Select all
visTempl.depth = CreationParams.WithAlphaChannel?32:24;


to

Code: Select all
visTempl.depth = 32;


then it will work :)

RG
User avatar
AreaScout
 
Posts: 410
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: New supertuxkart on odroid xu4

Unread postby AreaScout » Wed Dec 20, 2017 3:18 am

i suggest you to use 720p resolution for faster game play experience

Code: Select all
DISPLAY=:0.0 supertuxkart --screensize=1280x720 --fullscreen


RG
User avatar
AreaScout
 
Posts: 410
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: New supertuxkart on odroid xu4

Unread postby meveric » Wed Dec 20, 2017 5:08 am

It's working now, but every now and then it crashes and also seems to have some graphical issues here and there.
Also there are a lot of options that we currently try out.
Different ODROIDs will require different settings, as the full feature only runs on OpenGL ES 3.0 but most ODROIDs only have OpenGL ES 2.0.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8105
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: New supertuxkart on odroid xu4

Unread postby rondnelson » Wed Dec 20, 2017 11:42 am

Thanks a bunch, areascout! Cant wait to try it out!
Its amazing how helpful and active this forum is!
rondnelson
 
Posts: 4
Joined: Thu Jan 19, 2017 11:26 am
languages_spoken: english
ODROIDs: C2

Re: New supertuxkart on odroid xu4

Unread postby odroid » Wed Dec 20, 2017 12:09 pm

I've just tried AreaScout patch on my Ubuntu 16.04 + Kernel 4.14.7.
It works well even on 1920x1080 resolution. But 720p is faster on a complex map.

BTW, does it use OpenGL ES 3.x properly? I didn't add "-DUSE_GLES2=1" in cmake command.
Code: Select all
odroid@odroid:~/stk-code/cmake_build/bin$ DISPLAY=:0.0 ./supertuxkart
[verbose  ] main: Error messages and other text output will be logged to /home/odroid/.config/supertuxkart/0.8.2/stdout.log.
[error  ] User Config: Unknown value for soccer-use-time-limit; expected true or false
[error  ] User Config: Unknown value for hq_mipmap; expected true or false
[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/odroid/.config/supertuxkart/0.8.2/'.
[info   ] [FileManager]: Addons files will be stored in '/home/odroid/.local/share/supertuxkart/addons/'.
[info   ] [FileManager]: Screenshots will be stored in '/home/odroid/.local/share/supertuxkart/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in '/home/odroid/.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_US.UTF-8'.                                                                                           
[verbose  ] translation: Language 'English (United States)'.                                                                                         
Adding language fallback en                                                                                                                         
Irrlicht Engine version 1.8.0                                                                                                                       
Linux 4.14.7-93 #1 SMP PREEMPT Sun Dec 17 18:46:35 UTC 2017 armv7l                                                                                   
[info   ] IrrDriver: OpenGL version: 3.1                                                                                                             
[info   ] IrrDriver: OpenGL vendor: ARM                                                                                                             
[info   ] IrrDriver: OpenGL renderer: Mali-T628                                                                                                     
[info   ] IrrDriver: OpenGL version string: OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e                                           
[warn   ] Graphics: Can not find version for 'OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e' 'Mali-T628' - ignored.                 
[info   ] GLDriver: EXT texture format BGRA8888 Present                                                                                             
[warn   ] irr_driver: Using the fixed pipeline (old GPU, or shaders disabled in options)                                                             
[info   ] GrandPrixManager: Loading Grand Prix files from ../../data/grandprix/                                                                     
[info   ] GrandPrixManager: Loading Grand Prix files from /home/odroid/.local/share/supertuxkart/grandprix/                                         
[warn   ] OpenGL: OpenGL version is too old!                                                                                                         
[warn   ] LayoutManager: Statically sized widgets took all the place!!                                                                               
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/xml/news.xml                                                                   
[info   ] addons: Downloading updated addons.xml.                                                                                                   
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/xml/assets.xml                                                                 
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/1110206859552da39065475.png                                             
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/89723152459357f1ba2f9e.png                                               
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/159024492855672935bcc2e.png                                             
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/59659152757bac46d701ba.png                                               
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/153392961956ba7db858dd5.png                                             
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/761369642571470009d4c8.png                                               
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/346344363593fb9678017b.png                                               
[info   ] HTTPRequest: Downloading http://addons.supertuxkart.net/dl/images/102763041057d086473788e.jpg                                             
[verbose  ] irr_driver: Retrieved window location for config: 0 24
User avatar
odroid
Site Admin
 
Posts: 25823
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: New supertuxkart on odroid xu4

Unread postby memeka » Wed Dec 20, 2017 2:04 pm

@odroid - you sure it's using GLES and not GL over glshim then?
you got this in your log:
Code: Select all
[warn   ] Graphics: Can not find version for 'OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e' 'Mali-T628' - ignored.
User avatar
memeka
 
Posts: 3834
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: New supertuxkart on odroid xu4

Unread postby odroid » Wed Dec 20, 2017 3:34 pm

I didn't install glshim.
So GLES must be working. But I don't know why the warning message appears.
User avatar
odroid
Site Admin
 
Posts: 25823
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: New supertuxkart on odroid xu4

Unread postby AreaScout » Wed Dec 20, 2017 5:40 pm

odroid wrote:I didn't install glshim.
So GLES must be working. But I don't know why the warning message appears.


is it a standard image or is it in any way modified ? e.g SDL2 or so ?

@all

ok, this is how i came so far

Code: Select all
cd stk-code
wget -O supertuxkart.patch https://pastebin.com/raw/ZpB2CjZy
patch -p0 < supertuxkart.patch


this will get rid about the Graphics version warning

Code: Select all
[warn   ] Graphics: Can not find version for 'OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e' 'Mali-T628' - ignored.


if you look closely to that patch (https://pastebin.com/ZpB2CjZy) it does now the parsing of the renderer string right for Mali driver on ODROID's and in general, this is useful for graphical restrictions configured per driver version for different ODROID boards e.g GLES2 only boards like C2

after installing the game this can be configured in that file /usr/local/share/supertuxkart/data/graphical_restrictions.xml here is an example

Code: Select all
<card contains="Mali"             os="linux"    version="<3.1"    disable="HighDefinitionTextures"/>


i don't know all of this graphical restriction strings and what they are for, but this is something one can play around now to get the best performance out of that game ;)

RG
Last edited by AreaScout on Wed Dec 20, 2017 7:14 pm, edited 1 time in total.
User avatar
AreaScout
 
Posts: 410
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: New supertuxkart on odroid xu4

Unread postby odroid » Wed Dec 20, 2017 6:24 pm

I'm using this Ubuntu image and updated kernel to 4.14.7.
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20171212
It contains a slightly modified SDL2 to disable the mesa-softgl.
Anyway, I've already spent a couple of hours to play this nice game. ;)
User avatar
odroid
Site Admin
 
Posts: 25823
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: New supertuxkart on odroid xu4

Unread postby AreaScout » Wed Dec 20, 2017 6:46 pm

odroid wrote:I'm using this Ubuntu image and updated kernel to 4.14.7.
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20171212
It contains a slightly modified SDL2 to disable the mesa-softgl.
Anyway, I've already spent a couple of hours to play this nice game. ;)


ok i use this 'ubuntu-16.04.3-4.14-mate-odroid-xu4-20171126.img', i will try the newer one now

The Game looks nice ! FPS is slow here and there, guess i have to test more on this :)
Attachments
screenshot2.png
screenshot2.png (855.6 KiB) Viewed 245 times
User avatar
AreaScout
 
Posts: 410
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: New supertuxkart on odroid xu4

Unread postby meveric » Thu Dec 21, 2017 8:39 am

Image

Seems I finally figured out the last issues and can also apply some optimization to the game which hopefully means it should run a little bit faster.
I got rid of the crashes in some of the tracks, which for example prevented the use of the Story Mode.
I already have fully working versions for the C2, but I'm now building them for armhf boards.
I've already have some packages, just need to add the new binaries then I can upload it to my repository :)

There were a couple issues that worked together here:
1. you need to pass the -marm parameter during compiling, or else you run into a memory issue which caused the crash we saw earlier.
2. if you pass the -marm parameter the build failed when it tried to compile ASM code for angelscript
3. reason for that is, cause you need the -mfpu=neon-vfpv4 flag, or else it uses gcc default which normally is: --with-fpu=vfpv3-d16 and for that misses some registers that are required to compile angelscript
4. the CMakeFile.txt for angelscript has an error in it, it compiles the ASM code without using any compiler flag, so you need to make sure that you pass -mfpu=neon-vfpv4 here or else the compiling will fail due to 3.

After that I had no issues with supertuxkart on ODROID XU4 anymore and no crashes.

I'm currently try to figure out if optimizing specifically for XU4 (and other boards) does give us some speed benefits, or if "general options" are good enough, so either one binary for each board series, X/X2/U2/U3, C0/C1/C1+, XU3/XU4
or one binary for all boards.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8105
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: New supertuxkart on odroid xu4

Unread postby meveric » Sat Dec 23, 2017 2:16 am

I've uploaded my packages to my repository viewtopic.php?p=209564#p209564 and added a new topic in the Games forum viewtopic.php?f=91&t=29366
Please note, that I only provide packages for Debian not Ubuntu.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8105
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: New supertuxkart on odroid xu4

Unread postby odroid » Sat Dec 23, 2017 10:48 am

Thank you for sharing the packages. This game is really nice.
User avatar
odroid
Site Admin
 
Posts: 25823
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Projects

Who is online

Users browsing this forum: No registered users and 4 guests