Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases? #366

Open
artdeell opened this issue Apr 2, 2020 · 33 comments
Open

Releases? #366

artdeell opened this issue Apr 2, 2020 · 33 comments

Comments

@artdeell
Copy link

artdeell commented Apr 2, 2020

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

@artdeell
Copy link
Author

artdeell commented Apr 2, 2020

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

@khanhduytran0
Copy link

khanhduytran0 commented Apr 5, 2020

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
Copy link
Author

artdeell commented Apr 5, 2020

@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
Copy link

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

@khanhduytran0
Copy link

khanhduytran0 commented Apr 5, 2020

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
Copy link

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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

Dat thing is horribly slow.

@WesleyVanNeck
Copy link

WesleyVanNeck commented Apr 9, 2020

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

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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

@WesleyVanNeck
Copy link

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

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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
Copy link
Author

artdeell commented Apr 9, 2020

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
Copy link

you win have fun

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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

@WesleyVanNeck
Copy link

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

@artdeell
Copy link
Author

artdeell commented Apr 9, 2020

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

@WesleyVanNeck
Copy link

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
Copy link

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

@khanhduytran0
Copy link

khanhduytran0 commented Apr 9, 2020

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
Copy link

@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
Copy link

@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
Copy link

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

@longjunyu2
Copy link

longjunyu2 commented Apr 9, 2020

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
Copy link

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
Copy link

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
Copy link
Author

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

@artdeell
Copy link
Author

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
Copy link

khanhduytran0 commented Apr 10, 2020

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?

  • libhoudini: native crash, Boardwalk 2 too (this was tested on Android-x86, as same as Asus tablet Intel CPU.
  • How to install Windows to an Asus tablet Intel CPU? Limbo PC Emulator + KVM? Took ~2GB minimum.
  • Linux Deploy? It took ~1GB to install all necessaries things.

@khanhduytran0
Copy link

  • CrossOver Android x86 + WineD3D? Took ~1GB too.

@artdeell
Copy link
Author

@khanhduytran0 have some succes with Regal in my branch.

@artdeell
Copy link
Author

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

@artdeell
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants