User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

LibGDX on Buster

Sat Aug 17, 2019 2:34 pm

Hi all,

Just quickly - I finally managed to get LibGDX 1.9.8.rpi version - sorry O: - ) - to work on Rpi4 with Buster. As other topic here nicely pointed out that processing works quite happily with all that complication with VC vs Mesa OpenGL drivers I dived a bit more and found out that kind people around processing made their own version of JOGL so it works on RPi as well. (https://github.com/gohai/jogl)

With lots of tinkering (not extensively proud on my half bodged solution) I managed to make LibGDX 1.9.8.rpi.p build which happily starts no matter on two drivers issue.

I'll push my changes back in soon (tomorrow? day after?) - do pester me if I don't and if all goes well I'll try to progress LibGDX RPi version to the latest stable and latest SNAPSHOT, too. If there are any volunteers to help - please don't refrain to contact me or write here...

- - -

Finger in the air guestimate - RPi4 is 50% faster than RPi3... I have project (http://piwars.abstracthorizon.org/posts ... al-pinoon/) for which I slapped plane behind the scene with custom shader that creates perlin noise gentle colour shifting background. On Mac it works full speed (60FPS), on RPi3 maybe couple of frames a second while on RPi4 maybe 5-10 FPS... Not really measured it in real teams and like for like (yet to be done) - but at least I have something to devise 'quality' stress-test :roll:

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Sun Aug 18, 2019 6:55 pm

OK - changes are back to repo.

Whoever is to build from 1.9.8.rpi version will get jogl jars from processing project which, in turn, should allow running LibGDX without any black magic regarding two different openGL drivers supplied by Raspbian.

That allows LibGDX to run on Pi4 without any issues.

Next is getting final 1.9.8 version in and skipping to second last final version and the latest snapshot. Maybe next weekend :roll:

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Wed Aug 21, 2019 4:51 pm

I've deployed 1.9.8.rpi version to repo - https://raw.githubusercontent.com/natda ... x/mvn-repo

Next is to try to get to 1.9.9 (1.9.9.rpi)

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Wed Aug 21, 2019 8:43 pm

OK moving forward - version 1.9.9.rpi and 1.9.10.rpi are in https://raw.githubusercontent.com/natda ... x/mvn-repo.

JOGL impl now should follow what lwjgl and lwjgl3 are doing (implemented newly added methods, etc).

Next is the head of 1.9.11-SNAPSHOT....

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Wed Aug 21, 2019 9:49 pm

And now we are at 1.9.11.rpi-SPANSHOT which has merged in 1.9.11-SNAPSHOT of libgdx project.

Repo was updated, too.

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

Re: LibGDX on Buster

Thu Aug 22, 2019 2:27 pm

Thanks clicky.

If I grab any Linux binary from https://itch.io/games/top-rated/made-with-libgdx intending to play it on a Pi 4, what's the step-by-step procedure to run with this? Can I just replace the libgdx*.so native libraries similar to what seems to work for LWJGL games?

If the Java side can't easily be replaced on a closed-source game, any concern for mismatches if a game is built on 1.9.8 vs 1.9.11?

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Fri Aug 23, 2019 3:56 pm

I don't think they'll work :(
So far only way to have it running on RPi is to make runnbale with JOGL instead of LWJGL. JOGL was re-instated in this fork just because it works on RPi (2, 3, 4... Zero? Most likely) while I'm not aware of ports of LWJGL.

In order for game to work - one would need to do what you said (I think! :roll:) - plus decompile main class (which extends from Lwjgl or Lwjgl3) and redo it with Jogl. (see example here https://github.com/natdan/rpi-libgdx-example)

As for mismatches - I think that changes are not that intrusive or breaking - so there's good chance stuff will 'just work'. No guarantees, though :)

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

Re: LibGDX on Buster

Sat Aug 24, 2019 12:30 am

clicky wrote:
Fri Aug 23, 2019 3:56 pm
I'm not aware of ports of LWJGL.
See all the Minecraft Java Edition threads on the Gaming subforum! Both LWJGL2 and LWJGL3 run on the Pi (2 or above, not Zero).

Perhaps not every feature of LWJGL, but enough to run Minecraft.

Edit: Come to think of it, I think you mean that there isn't an LWJGL port using the legacy brcmGLES driver (for the Pi Zero). This is true, although one can use gl4es. Also, with 512 MB of RAM it's unclear whether Java gaming matters much on the Pi Zero anyhow.

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Tue Aug 27, 2019 2:03 pm

jdonald wrote:
Sat Aug 24, 2019 12:30 am
See all the Minecraft Java Edition threads on the Gaming subforum! Both LWJGL2 and LWJGL3 run on the Pi (2 or above, not Zero).

Perhaps not every feature of LWJGL, but enough to run Minecraft.

Edit: Come to think of it, I think you mean that there isn't an LWJGL port using the legacy brcmGLES driver (for the Pi Zero). This is true, although one can use gl4es. Also, with 512 MB of RAM it's unclear whether Java gaming matters much on the Pi Zero anyhow.
That's interesting. Someone would need to put some effort into making LWJGL (or LWJGL3) version of LibGDX that works on Pi. I would be very much interested in seeing it done and/or offer help. Unfortunately I am not sure I would be the one to go and do it right now...

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

Re: LibGDX on Buster

Tue Sep 03, 2019 5:58 am

PokeMMO is built on libGDX and works on Raspbian Buster via LWJGL: https://www.raspberrypi.org/forums/view ... p?t=154482

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

Re: LibGDX on Buster

Tue Sep 03, 2019 7:18 am

Yet another GL game lib :D

Godot, Love2D, Openscenegraph…...
Ogre working yet?
Getting to be too many.
C, C++, Lua, Go, Pascal, Python, Java.....

Have not tried Java on Pi4 yet should be much quicker now.
LWJGL is inside engines like????

I suppose with the 3D stuff using OpenGL in hardware, the higher level application stuff can be done in slower languages.

Is there a Rust game lib/engine?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
clicky
Posts: 383
Joined: Thu Oct 25, 2012 7:34 am

Re: LibGDX on Buster

Mon Sep 30, 2019 5:29 pm

I've added another example that uses LibGDX 1.9.11-SNAPSHOT (1.9.11.rpi-SNAPSHOT to be precise):

https://github.com/natdan/rpi-libgdx-ex ... er/rpi-rog

This time all was build on the Raspberry Pi - including gwt deployed here: https://www.abstracthorizon.org/libgdx/rpi-rog/ (best viewed on Raspberry Pi :P )
Attachments
ROG-RPi.jpg
ROG-RPi.jpg (33 KiB) Viewed 550 times

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

Re: LibGDX on Buster

Tue Oct 01, 2019 6:01 am

Nice, WebGL is working.

Have not touched Java since 8 and Processing since 1.5.
OpenJDK/FX is new to me, had to install IDEA first.

But processing and the graphics demos are very usable on Pi4's.
Just before Pi's came out I was doing apps and prototyping on embedded PC's.
Now I have come full circle and do the same sort of stuff on Pi4's.
Who says Pi4's are not desktop PC's?

Wow lots of new libraries to play with.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Java”