zhuowei / Boardwalk

Source code for Boardwalk, a Minecraft Java Edition launcher for Android (not actively developed)
Apache License 2.0
355 stars 54 forks source link

Releases? #366

Open artdeell opened 4 years ago

artdeell commented 4 years ago

I saw you have modified some code to unpack jvm and lwjgl3 automatically. Can you build it, or at least setup automatic builds?

artdeell commented 4 years ago

Also, you can request the PojavLauncher's native sources to understand why nothing is rendered.

khanhduytran0 commented 4 years ago

Not, I used original code from Boardwalk with some jarjar to make everything back to java.awt. So native library liblwjgl.so will be the same as Boardwalk (only some hex modify to replace glshim with gl4es)

artdeell commented 4 years ago

@khanhduytran0 That's the bad idea to just modify the current binaries with hex editor. If you will attempt to embed Regal to PojavLauncher, you will need to re-link the binary anually.

khanhduytran0 commented 4 years ago

I'm lazy to build native libraries from source (lazy to open the laptop and ~1hour for all actions)

khanhduytran0 commented 4 years ago

My one detection is: Without delay before calling Minecraft main method in Android 5? and above, app go to Not Responding, here (some code has been moved to other place)

    @Override
    public void onSurfaceCreated(GL10 gl, javax.microedition.khronos.egl.EGLConfig p2)
    {
        calculateMcScale();

        EGL10 egl10 = (EGL10) EGLContext.getEGL();
        AndroidContextImplementation.theEgl = egl10;
        AndroidContextImplementation.context = egl10.eglGetCurrentContext();
        AndroidContextImplementation.display = egl10.eglGetCurrentDisplay();
        AndroidContextImplementation.read = egl10.eglGetCurrentSurface(EGL10.EGL_READ);
        AndroidContextImplementation.draw = egl10.eglGetCurrentSurface(EGL10.EGL_DRAW);
        egl10.eglMakeCurrent(AndroidContextImplementation.display, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        System.out.println(new StringBuffer().append("Gave up context: ").append(AndroidContextImplementation.context).toString());

        new Thread(new Runnable(){

                @Override
                public void run()
                {
                    try {
                        Thread.sleep(200); // HERE to prevent App Not Responding.
                        runCraft();
                    } catch (Throwable e) {
                        Tools.showError(MainActivity.this, e, true);
                    }
                }
            }).start();
    }
WesleyVanNeck commented 4 years ago

https://github.com/longjunyu2/MCinaBox/

artdeell commented 4 years ago

https://github.com/longjunyu2/MCinaBox/

Dat thing is horribly slow.

WesleyVanNeck commented 4 years ago

@artdeell get a new device then am using 1.7.10 60 fps fully

artdeell commented 4 years ago

1.11.2. 1 fps. PojavLauncher: 1.11.2 40fps. Who still agrees that OpenJDK VM is faster than ART?

artdeell commented 4 years ago

Also, don't thing my device is slow. It's Snap 820.

WesleyVanNeck commented 4 years ago

its slow asf also art isnt a java its a cache format like dalvik cach

artdeell commented 4 years ago

ART is DESIGNED for Android, OpenJDK isnt.

What we've getting from ART: ahead-of-time compilation JIT only compiles when class is loaded proprietary format (.dex)

What we've getting from OpenJDK: slow unoptimized JIT for arm32 big ram usage standartized format (.jar)

artdeell commented 4 years ago

its slow

Russian users have lower standards Also, why do you think my phone is slow when app have no optimizations, compiled for arm32, uses slow PC-like Java and any competitor app will run Minecraft better?

I think MCinaBox is just like an experimen and it's not intended for serious use.

@LegacyGamerHD

WesleyVanNeck commented 4 years ago

you win have fun

artdeell commented 4 years ago

that was easy lul some aot to my launcher and it will run vanilla like a jet

WesleyVanNeck commented 4 years ago

tbh that launcher is way slower for me 🤦 idk why but latest prerelease is slow for on a s9+

artdeell commented 4 years ago

use 10b1, 10b2 is 32-bit only, it will lag.

WesleyVanNeck commented 4 years ago

still having worse performance tbh i got better performance with https://github.com/longjunyu2/MCinaBox/ then still i got in 1.11.2 200 fps with big lag spikes when rendering chunks with your launcher tbh your launcher dont even support 1.15 and they do 1.7 smooth as butter and by you guys lagy mess with lag spikes while loading chunks

khanhduytran0 commented 4 years ago

x86 run with houdini it always crash and crash. Already MCinaBox don't support x86.

khanhduytran0 commented 4 years ago

Also MCinaBox will no longer works on Android 10 without root since Android 10 disable execute binaries in private data directory! https://www.reddit.com/r/androiddev/comments/b2inbu/psa_android_q_blocks_executing_binaries_in_your/

longjunyu2 commented 4 years ago

@khanhduytran0 The target API level of MCinaBox must be 22 or less, otherwise openjdk will be blocked from starting. But this problem is not fatal. Sometimes we should be good at using the compatible mode of Android system.

longjunyu2 commented 4 years ago

@khanhduytran0 Although openjdk may encounter problems in the future, I don't think DVM is the best solution. It is difficult to deal with the game problems caused by the difference of DVM between different versions. For example, it is now known that encountering water will make FPS drop significantly. Moreover, the successful operation of DVM requires additional support from makeshift library, which makes it difficult to port a complete set of Java implementation.

khanhduytran0 commented 4 years ago

https://android.googlesource.com/platform/frameworks/base.git/+/froyo-release/awt/ It was legacy port for Android but it works.

longjunyu2 commented 4 years ago

Pojavlauncher implements zhuowei's DVM scheme, mcinabox implements zhuowei's JVM scheme. They obviously have different advantages and disadvantages, but I don't think these should be paid too much attention to now. The JVM solution uses openjdk, which means that it will support standard jar files, and it also needs to use corresponding runtime libraries for different architectures. These are not the reasons to give up the JVM solution, it also has its advantages. In the future, I will enable it to support the automatic installation of forge and liteloader, as well as the runtime libraries of other platforms. It's just a matter of time.

longjunyu2 commented 4 years ago

https://android.googlesource.com/platform/frameworks/base.git/+/froyo-release/awt/ It was legacy port for Android but it works.

Wow, this is a really cool project.

MCredbear commented 4 years ago

x86 run with houdini it always crash and crash. Already MCinaBox don't support x86.

nope sir,in fact,longjunyu test MCinabox with x86 AVM,and,if we have x86 machine,why don't we play MC on linux or windows.....

artdeell commented 4 years ago

maybe for you MCinaBox is better, but PojavLauncher is better for others, so don't think MCinaBox will always be better.

artdeell commented 4 years ago

For some cases MCinaBox will be worser. For example, execution of 32-bit executables on my device is not good. Also, if MCinaBox project require better perfomance for Minecraft, it should NOT use openjdk that was designed for x86 on arm. You need a completely different VM to work on most phones.

khanhduytran0 commented 4 years ago

nope sir,in fact,longjunyu test MCinabox with x86 AVM,and,if we have x86 machine,why don't we play MC on linux or windows.....

In this case, ex. Asus tablet have Android x86 Intel CPU and someone want to run on it; or want to test on AVD x86. How?

khanhduytran0 commented 4 years ago
artdeell commented 4 years ago

@khanhduytran0 have some succes with Regal in my branch.

artdeell commented 4 years ago

I DIDN'T make any changes to LWJGL or liblwjgl. Your binaries just fit right out of the box!

artdeell commented 4 years ago

So we can just write a if-else with System.loadLibrary!