About Raspberry development

I’ve noticed this thread [SOLVED] Development on Raspberry Pi 4 - #34 by Pavl_G

I have a few questions:

  • are you supposed to develop (or at least compile) from the Pi or can you cross-compile from more powerful hardware?
  • which Java did you use?
  • are you going to write a wiki page for this?
1 Like

Hi, @Pesegato

yes, you can develop from anywhere (your laptop or PI), the best is to develop the game on your laptop → push to git → then pull from your PI → compile, run & build using gradle tools.

You just need to remember the following after pulling the code into your PI:

  • clear out the object files which are Architecture dependent like libbulletjme.so resulting from testing the game on your laptop
  • add the dependencies of lwjgl for Arm-Cortex-A Systems :
    /**don't forget this in order to extract the native library lwjgllib-arm32 for arm32 linux raspiOS*/
    implementation "org.lwjgl:lwjgl:3.2.3:natives-linux-arm32"

    /** if you encounter any problem w/ extraction of .so object files or native libraries of other lwjgl component please add what's missing from lwjgl repositories
    *   implementation "org.lwjgl:lwjgl-glfw:3.2.3:natives-linux-arm32"
    *   implementation "org.lwjgl:lwjgl-opengl:3.2.3:natives-linux-arm32"
    *   implementation "org.lwjgl:lwjgl-openal:3.2.3:natives-linux-arm32"
    *   implementation "org.lwjgl:lwjgl-jemalloc:3.2.3:natives-linux-arm32"
  • Thanks to Stephen Gold, now Minie Supports the embedded systems of armv7l or arm-hf starting from v3.1.0

  • RPI4B is an arm64-Cortex-A72 with arm-32 based systems, BCM2711 Processor & a max ram of 8GB, GLES3.0 driver, so expect PBR & Lighting shaders, post processor filters to be very slow (FPS drop to 3-10), but thanks god Unshaded shader is working fine (FPS upto 54-60).

The shipped Open-JDK( java.runtime.version = 11.0.9+11-post-Raspbian-1deb10u1)
, but you need arm32 java versions, if you are going to install another version.

Take a look at : [SOLVED] Development on Raspberry Pi 4 - #66 by Pavl_G

I agree with you, we should do a wiki page for it.

EDIT : I haven’t tested AudioNodes yet on the PI, i always schedule that, don’t know why.

1 Like

I think these shouldn’t even be committed to begin with! Add *.so to .gitignore

So there should be a separate build.pi.gradle and run it with gradlew -b build.pi.gradle?

1 Like

You can put them in the same gradle file, having a separate gradle file for the Pi is a good one, but you don’t need to, amd64 systems ignore arm32 dependencies & vice versa as if it doesn’t even exist, the problem is just with the extracted native libraries.

yes, you are right indeed !

implementation “org.lwjgl:lwjgl:3.2.3:natives-linux-arm32”

If you specify implementation 'org.jmonkeyengine:jme3-lwjgl3:3.4.0-beta1', Gradle should should automatically include the necessary LWJGL dependencies.

1 Like

Good News ! Have you recently packaged jme lwjgl with arm32 lwjgl versions, because i haven’t seen those in the features ?

1 Like

It’s recent, but it’s only for LWJGL v3, not LWJGL v2.

1 Like

I guess this happens when you make a build on the target hardware? So if I want to build a Pi version I need to run gradle from Pi?

Not feasible to just build all target versions from PC?

1 Like

if you mean jar build(gradle jar) then i think it can be from anywhere, since binaries are shipped with the jar & they get extracted at runtime only.

if you mean gradle run, they must be ran from the PI, to generate the native object .so files for arm32 (usable by JNI), but if you ran it from PC, then amd64 or 32 .so files get generated.

1 Like

You mean that, just by switching to jME 3.4 & lwjgl3, I basically get Linux/arm32 support for free from the same tarball? Awesome!


Yep, as you can see here, they are now shipped within the jme3-lwjgl3 java module :

1 Like