clicky
Posts: 222
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on RPi

Mon Feb 12, 2018 9:37 am

Hi, I have encountered same problem as you are right now and I've done something to overcome it. I just cannot remember what was it. I suspect I just upgraded distro at the end as that seemed the simplest. Box that might have all of it is due to circumstances not on the net at the moment - I'll attach it in aprox. 4 hours form now and I'll be able to have a quick look and I'll let you know...

msx80
Posts: 10
Joined: Sun Feb 11, 2018 4:36 am

Re: LibGDX on RPi

Mon Feb 12, 2018 10:10 am

Don't worry, i actually managed to solve the problem, it was indeed a mismatch in libgdxarmgnueabihf.so shipped with your rpi-enabled libgdx.
Maybe you cross-compiled them or indeed hade some different distro before/after. Btw, i'm not a c/c++ expert so maybe i'm talking nonsense, but are we sure we need to link to libstdc++.so ? If it's possible at all to avoid, it would be great becouse i'm afraid new versions of Raspbian/Retropie would require recompilation and that's pretty bad.

Anyway, to solve it i compiled the .so directly on the raspberry using your build-jni-for-rpi.sh (which btw has a copy/paste typo you should fix (double ant -f), i hope that's not the ultimate source of the problem :P). It outputted some valid version of the libraries, i copied them on rpi-enabled libgdx, built it and it worked!

Great job clicky! I can report that:
  • * gdx-controllers works great, but the event based version fire events continuously even if nothings is touched, while regular desktop version fires only if the controller was moved (not sure if the problem is in the controllers driver or in some point inside libgdx).
    * JoglNewtApplication/JoglNewtApplicationConfiguration don't seem to honor the foregroundFPS and backgroundFPS. Are you the author of the jogl backend?
Another question, do you think rpi support will ever be merged into official libgdx ?

clicky
Posts: 222
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on RPi

Mon Feb 12, 2018 10:24 am

Good to hear you've sorted it. :) You've intrigued me and I'll check what I've done + update example to work with the latest + move version to stable 1.9.8 and 1.9.9 snapshot. Ah, only question when! LOL

To answer your questions:
1. I am not C/C++ expert by any means. Not even apprentice or enthusiast. So there are two of use - blind leading blind
2. I am not author of anything LibGDX. I wouldn't know more than you do about joystick support. At one point I started looking into what is happening with OSX impl, but I don't know anything about OSX works, C/C++...
3. I am not JOGL author nor associated with them. Work here is mere derivative of what @xranby (he might be closer to jogl) and others (one of the topics: viewtopic.php?f=81&t=112806) did...
4. I don't think this will be merged back to LibGDX. Current build system there is quite convoluted and they've rejected some half way solutions like this one is and there is nobody willing to put together full/proper solution - hence my fork :(

msx80
Posts: 10
Joined: Sun Feb 11, 2018 4:36 am

Re: LibGDX on RPi

Tue Feb 20, 2018 10:13 am

Hi there, i managed to make everything work decently. I was wondering if you could update your repository with a working version (that is, with the correct libgdxarmgnueabihf.so ) of either 1.9.8 or 1.9.9? That way people could build our projects without having to build the whole libgdx.

If anybody needs it, to make audio work, the quickest way is to run a "sudo modprobe snd_pcm_oss". This will load a wrapper library to make alsa interoperate with oss, since libgdx uses OpenAL and OpenAL uses oss. I tryed to make OpenAL talk to Alsa directly but couldn't, and i was warried that something else could break somewhere else so gave up :P

alexis-puska
Posts: 2
Joined: Sat May 05, 2018 2:18 pm

Re: LibGDX on RPi

Sat May 05, 2018 2:23 pm

Hi all,

I follow this instruction to create a project and a subproject for my raspberry pi. I create the jar and that run correctly. But i continue the development of my game, and when i used freeType, i package the project test on my pi, and i get trouble with the libgdx-freetypearmgnueabihf.so
Caught GdxRuntimeException : Couldn't load shared library 'libgdx-freetypearmgnueabihf.so'

I read that a developper add to libgdx all stuff to compile libgdx freeType for arm, i have found the github repository, but nothing on the description to compile. The library is outdated 1.9.5 -> current 1.9.8. How can i compile and use the compilation in my project ?

thx

Return to “Java”

Who is online

Users browsing this forum: No registered users and 3 guests