Software > Applications and Porting

[GAME] Minecraft Java Edition (LWJGL being ported)

(1/3) > >>

emue:
Minecraft is the rare example of a commercial game that can be made to run on OpenPOWER machines. Of course this is all completely unsupported. I can report success on version 1.15.2 of the Minecraft Java Edition. I'm targeting Linux ppc64le. As this is a commercial product, a Mojang account with a valid license is required.

The actual game, being written in Java, is relatively portable already. Luckily, the platform specific part, which is the LWJGL3 framework, is open source. No changes to the actual source code appear to required, but the build system, which is distributed among several repositories, needs some work.

Another issue is the game's launcher, which is a native binary only provided for x86 platforms. With its job being mainly to download game assets, manage accounts and start a Java instance, open source alternatives exist. I'll be using the MultiMC launcher, since this is relatively easy to use and can be built on Linux ppc64le.

Quick start
As a preview of the game in a working state, you can follow the following guide. This will download prebuilt binaries from a third party (me) as well as Mojang. It is a good idea to only run binaries from sources you trust.

The following will only work on Linux ppc64le. Both 4k and 64k kernel page sizes are supported. Java is also required. I used OpenJDK 11 on openSUSE 15.1 LEAP. Recent Tumbleweed should also work.


* Install the MultiMC launcher (https://multimc.org/). Source code can be downloaded from GitHub: https://github.com/MultiMC/MultiMC5/. I followed the build guide: https://github.com/MultiMC/MultiMC5/blob/develop/BUILD.md
* Configure your Mojang account in MultiMC.
* Create a new Minecraft instance. This needs to be configured especially for ppc64le. I'v provided patched instance configs here:

* 4k kernel pages: https://github.com/EMue/patch_multimc_instances/releases/download/1.15.2-preview-ppc64le/1.15.2-ppc64le.zip
* 64k kernel pages: https://github.com/EMue/patch_multimc_instances/releases/download/1.15.2-preview-ppc64le/1.15.2-ppc64le_64kpages.zipThese URLs can be pasted directly into the import dialog. Java binaries will be downloaded from Mojang as usual, but LWJGL is downloaded from a local repository on my GitHub.

* With this, the game should run. I'm getting at least 40 fps at 4k UHD resolution with an AMD Vega GPU.
TODO/Caveats
Required changes to LWJGL are on my GitHub: https://github.com/EMue
Previous discussion is here: https://github.com/LWJGL/lwjgl3/issues/495

The following still needs to addressed:

* Attempt to merge LWJGL changes to upstream in order to provide official binaries and to simplify the build.
* Minecraft provides native binaries for text-to-speech on x86. I'm not certain where in the game this is used, but this feature will likely not work on other platforms.
* I don't expect any official support for this from Mojang/Microsoft. If anyone would like to try to convince them to pick it up, please feel free.
* The jemalloc library bundled with JWJGL is built with a fixed page size parameter and will only work on a compatible kernel. This requirement seems overkill for a game, and necessitates two separate LWJGL builds. Quite likely a more elegant solution is possible.

q66:
tested on voidlinux-ppc, multimc from repos, openjdk 8 or 11, default 4kB page kernel, getting >60fps easily regardless of the resolution (rx 5700 xt), works out of box.

emue:

--- Quote from: q66 on May 14, 2020, 09:00:53 pm ---tested on voidlinux-ppc, multimc from repos, openjdk 8 or 11, default 4kB page kernel, getting >60fps easily regardless of the resolution (rx 5700 xt), works out of box.

--- End quote ---

After your comment on IRC about page size, I double checked - jemalloc configured for 64k pages indeed appears to work on a 4k kernel. Thanks for pointing that out! Seems I only actually tested the reverse combination, which in fact just errors out.

Unless anyone objects, I will drop the 4k page build and will later try to merge the 64k CI config.

q66:
well, having a 4k-native build is probably more efficient, but yeah. I also tried the 64k version, it works as well on 4k kernel.

shawnanastasio:
Are there any plans to get this merged upstream? I don't see it mentioned on the LWJGL issue you posted (https://github.com/LWJGL/lwjgl3/issues/495).

Navigation

[0] Message Index

[#] Next page

Go to full version