libTAS
libTAS copied to clipboard
Does LibTAS Support Minecraft?
Does LibTAS Support Minecraft? if not will it ever?
That is not an issue. You can test it yourself. If it does not work you can post here details of what is happening.
I couldn't even figure out how to run it with libtas cause java wasn't working
Could this be re-opened? I've tested this myself (specifically 1.6.4 as it's used for glitchless/set seed) and there are some issues.
To run the game: first open the game normally, then copy the java command used to run the game (I found this using ps -eF > ps_out + cat ps_out). Search for -Djava.library.path and copy the specified folder to a new directory, then change the argument to point to your new folder. Nothing else needs to be changed about the command, but I'd recommend replacing instances of .minecraft with a new folder (after copying over necessary files) so you don't break your saves. Now you can simply copy the command over to libTAS and it should run.
Now, for the issues:
-
Game hangs when trying to load the title screen on default settings.
gettimeofday()on the main thread (iirc) helps it advance a frame or two more, butclock_gettime()for the secondary thread allows the game to run. However, this timing option for some reason makes 1 frame equal to several seconds. -
Using
clock_gettime()orUncontrolled Timewill allow you to create/load a world, but you will not be able to escape the pause menu. I presume this is because the game thinks it is out of focus, but it's not. -
Using
Native Eventsdoes let you escape the pause menu but results in an immediate crash. Crash log seems to indicate that this is caused by a failure to grab the mouse.
Any update on this?
I just tested the last demo version of Minecraft. Indeed, the time management of the game seems messy, I'm not sure how it could be solved. I didn't have the pause menu problem. Controls worked fine except that the mouse does not move the camera (mouse works in menus though). Maybe a problem about mouse grabbing like you said.
@noellekiq what version is that crash log for? I do some modding stuff and I'd like to figure out which classes those are in the stacktrace
that was 1.6.4, been meaning to try on latest but haven't gotten the time yet
still seeing a crash whenever it tries to grab the mouse on java 8 & minecraft 1.14.2. tried other versions of java incase it was a specific issue (i got java 10 to kinda load once but it crashed at the end of the loading bar, java 11 crashes before even creating a window)
It looks like it's actually crashing in the superflat preset menu, unless MCPBot_Reborn is lying to me. I'll look into 1.14.2 when I get a chance to, and maybe I'll try running it with Forge to get SRG names in the error message to help narrow down the problem call
...a superflat crash doesn't make sense when it was happening after unpausing the game in a survival world, and the crash logs mention the most likely culprit: org.lwjgl.input.Mouse.setGrabbed
i realised the game was crashing when trying to create a world seemingly (although that could've just been some of the random crashes that happen, ive tried other times and didnt get past 0% in generation but maybe im not patient enough). so i tried pregenerating a world which was able to get it to load, but the game crashed at 100%. unfortunately i havent been able to extract a crash report as it seems to be java-level crashes(?), but this would either be when trying to render (seems kinda unlikely since everything else worked fine) or grabbing the mouse still maybe?
overall, even with uncontrolled time and native events, the game randomly crashes even just on the title screen so i imagine even if whatever issue causing this was fixed, it still wouldn't be very easy to TAS. (might want to try an older version again though)
update: with uncontrolled time and native events 1.12.2 works, successfully generates and loads into a map, and is playable. more information to come as i try to make this work without debug options.
clock, SDL_GetTicks, & SDL_GetPerformanceCounter load into the game then hang on the title screen. clock_gettime on all threads gets into the game (with the same high FPS issue as before) but crashes when loading a world. this doesn't seem to be a timing issue however as it crashes with uncontrolled time (but not native events). unsure of how to test this further without further fixes to libtas.
oh, i forgot to try recycle threads. turning that off allows it to get into the game with the clock_gettime on all threads but crashes soon after loading. uncontrolled time also allows entry, however the game still believe it doesn't has focus and so it won't let you exit the pause menu. turning off this functionality beforehand (F3+P ingame) will prevent it from pausing but the mouse movement does not work, probably for the same reason. clicks work though. (kinda, i couldnt hold left click but that might be timing issues.)
(i'm done spamming this thread now :D)
Has anyone thought of asking for help from the minecraft community? Not sure if that would be a good idea.
asking for... what, exactly? (and from who, specifically?) it's a series of complicated libtas problems (or just unimplemented functions) causing the issues. specifically the game believe it is out of focus and therefore ignores some inputs, however timing issues prevent you from even getting this far. (and i think Kilaye is too busy with wine and other games he actually owns to take a look)
The main issues are probably related to wrestling with Java itself and not Minecraft.
This game falls under the multithreading problem (regarding timing and determinism), which mainly comes from too many layers (java, java graphical toolkit, game). I don't have any good solution to propose.
Garbage collection in Java is nondeterministic and stalls the main thread, so i see little chance at getting a run to sync.