Jump to content

Minecraft Java on a Pro1


Recommended Posts

On 12/31/2020 at 5:49 AM, tdm said:

A bit OT but ... does Minecraft Java run on this?

 

Interesting question. My guess would be that, if at all, Minecraft will run unacceptably slowly.

As far as I know, there is no native implementation of a JRE on Sailfish. Here's an old and quite defunct thread about this on the Jolla forum.

Now, I see no reason why it would not be possible to install the standard Linux versions of OpenJDK or even OracleJRE on Sailfish. Initially, this would enable text-only JAVA apps. Graphics in (Linux) OpenJDK/OracleJRE depends on X11, which SailfishOS does not support out-of-the-box. That could however be fixed using XWayland, which can be installed on SFOS somehow (see e.g. here).

However, as we discussed in that same thread, even then there will be no hardware-accelerated OpenGL. In the end, you hit the same limitation as in a Linux-Chroot on Android/LineageOS: since SFOS is still using the same (Android) Kernel, the standard Linux interfaces for HW acceleration are not available, hence programs designed for desktop Linux cannot take advantage of the GPU.

Edited by claude0001
  • Thanks 1
Link to post
Share on other sites
On 12/31/2020 at 5:49 AM, tdm said:

A bit OT but ... does Minecraft Java run on this?  And if it does, how well does it run?

Sooo ... I could not resist doing the experiment. 😄 Not on SFOS/XWayland (as I do not have that on my device), but using my LineageOS/Linux-Chroot (devuan 3) with Xvnc. As argued above, I expect the two to yield quite similar results.

As expected: Minecraft Java Edition does run in principle (yay!), but with so low framerate that it is not practically useful.

What I did:

  1. Installed the default OpenJDK 11 shipping with Devuan/Debian (beowulf/buster). No problems here.
  2. Turns out running Minecraft is trickier than expected. I spent most of the time at this point, trying to understand internals of the game engine. While the program is a JAVA (and thus portable) app in principle, it depends on lwjgl which is not part of JAVA SE, but ships with the Minecraft Launcher. As the latter expects an x86/amd64 environment, it provides only the respective builds, which of course does not help us with our Pro1. To make things worse, the Launcher downloads and unpacks its preferred lwjgl libraries on-the-fly each time the game is started, so manual patching using the (perfectly available) arm64 versions is difficult. Grr.
  3. In the end, the easiest solution is to use a third-party launcher fixing all that. After 5 minutes of googling I found MultiMC for which an arm64 port exists. The port seems not to have been updated in a while and supports only Minecraft releases up to 1.16.1 -- but for the purpose of our experiment that should be good enough.
  4. After setting up a Minecraft version and my user account in MultiMC, Minecraft just starts normally without further tinkering. Horay!
  5. As expected, performance is pretty bad due to software-rendering in Mesa3D (llvmpipe). With the -- tiny -- default window size and standard graphics settings I get approx. 3 FPS in an ocean/forest biome. Sound works via my pulseaudio->XRDP->MS-RDP-App setup, even without much latency it seems. Nice. Keyboard input works fine. Mouse control is horrible, but that's not directly related to the Pro1. My way of accessing the Linux chroot emulates a remote-controlled cursor and Minecraft gets confused by that (I cannot play via mouse-sharing on my PCs either, probably for the same reasons). The game did not crash on me, but I honestly didn't spend much time in it.

At the end of the day, this has been an interesting test of how far you can go with desktop-Linux software on our device. After all, Minecraft is a quite complex JAVA app.

One could probably tweak performance a little by tinkering with graphics settings or by getting Optifine to run. Also, my Xvnc/XRDP solution likely adds some additional graphics overhead compared to a native X11 server.

It would thus be interesting if anyone could repeat this experiment on a SFOS/LXC system like @matf showed here. The fundamental problem -- namely the lack of GPU-accelerated OpenGL -- should be the same in both cases though ...

Obligatory screenshots:minecraft_test_1.thumb.png.80812d4bc6e01f73165c2ae449b5c1f4.png

minecraft_test_2.thumb.png.fe17c3f441016360cc587c95a9dd644e.png

Edited by claude0001
  • Thanks 3
Link to post
Share on other sites

A few folks on the discord server have been experimenting. In particular "kabouik" installed OpenJDK in a LXC container. I sent him the minecraft java files and pointed him to the lwjgl arm64 libs. He was able to get it running, but as mentioned, it is rather slow due to lack of GL.

 

So we have two working solutions but neither are accelerated.

 

In the meantime I've found android based minecraft launchers. So I'm not sure which is going to win out yet.

 

PS: this is not for me, it is for my oldest son. Apparently minecraft PE (bedrock) and minecraft java behave differently and he prefers the Java behavior.

 

  • Like 2
Link to post
Share on other sites
On 1/3/2021 at 4:42 AM, tdm said:

PS: this is not for me, it is for my oldest son. Apparently minecraft PE (bedrock) and minecraft java behave differently and he prefers the Java behavior.

 

My son also says the same thing 😄 

Managed to kill his minecraft server yesterday docker decided to break :S

Link to post
Share on other sites

Also java minecraft have awesome mods and modpacks, right now I'm playing with friends on Sevtech: Ages on the sky. Great modpack. Also Enigmatica 2: Expert was a really good one but this ramps up crafting difficulty to ridiculous level and its indeed for experts 😄  

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms