Steveleeb

Reduce micro-freezes / j10?

Recommended Posts

The micro freezes that Wurm Online suffers im told is an OpenGL issue that's promised to be fixed in their next update so it isn't being addressed by Codeclub.
This is what i have been told.
Unfortunately it's been some time, it got to the point where it was putting me off the game.
Most people are using Java 8, fortunately Java 10 reduces the problem to barely noticeable levels. So i now run Wurm Online with Java 10.
it's worth mentioning that my framerates climbed by 10fps when i did so.
(you have to create an oracle account to download the J10 runtime so i threw it on my google drive for friends)
that said, this is the download page - https://www.oracle.com/java/technologies/java-archive-javase10-downloads.html

Now for Wurm Unlimited.. unfortunately WU comes with it's own redist located here;
Ihr4815.jpg

I tried simply copying J10 from my /program files/java directory.. the front end wouldn't even load and i had to re-verify all files.
This is a steam thing, could anyone be kind enough to explain how i might be able to force WU to use my Java 10 installation?

Edited by Steveleeb

Share this post


Link to post
Share on other sites

Java 10 is not an LTS version, currently Java 11 is what you should be using right now, followed by Java 17 next year.

 

I am not sure how to change that client side, I only know how to do it server side.

Maybe the client mod loader has an option to do so, but I am not sure, the server modloader does have an option for sure.

  • Like 1

Share this post


Link to post
Share on other sites

Client mod loader Instructions

* Unzip the contents of client-modlauncher-<version>.zip into the "WurmLauncher" folder

* Unzip the contents of the individual mods you want to run into the "WurmLauncher" folder. This adds the required .properties files to enable the mods.

* Run patcher.bat

* Start Wurm from Steam

 

the patcher.bat contains this:  
<..\runtime\bin\java -classpath patcher.jar;javassist.jar org.gotti.wurmunlimited.patcher.PatchClientJar
pause>

Which seems to suggest it depends on the java redist that steam insists on using. (because that's the directory it points to)
seeing that java itself isn't a mod, i think there's no option to force the version i have in my \programfiles\java directory.
I  considered once again copying the contents of \programfiles\java into \runtime\bin\jav THEN running the patcher .. this i might try what do you think?
I could only find development kits for anything above J10, the latest runtime i could find is J10.
Im confident that the version Wurm Unlimited is using within the \runtime\bin\java folder is 8. which is a big problem.
Are you saying that this will change one day? because if CC have halted development on WU (they won't even import the new keybinds), then i don't see it happening.

Edited by Steveleeb
final edit done

Share this post


Link to post
Share on other sites

LaunchConfig.ini allows you to override the Java path

 

[Runtime]
OverrideDefaultJavaPath=false
JavaPath=

 

patcher.bat uses the Java that is shipped to every WU user by default. I don't think there is any hard dependency on Java 8 in the patcher. So you can replace the path in patcher.bat.

Going to Java 10 or 11 may break some mods however. At least the scriptrunner (server) mod and anything that depends on it may break because Oracle decided to deprecated the integrated Javascript runtime.

 

I'd advise to first try to get vanilla WU to work by adjusting the path in LaunchConfig.ini. If this works properly you can try to get it to run with the modloader.

 

  • Like 1

Share this post


Link to post
Share on other sites

thank you for attending to the thread that is highly helpful :)
When i change <OverrideDefaultJavaPath=false> to <OverrideDefaultJavaPath=true> this pops up  when i run it;

Spoiler

kmwmGWC.jpg

then it'd close and nul.
So,
<OverrideDefaultJavaPath=false>
<JavaPath=C:\Program Files\Java>
i'm going to go with this and see how it goes.


edit - I'm fairly certain the override needs to be set to true.

How do make it recognise my native java directory when the above fails to do so?
To clarify -


[Runtime]
OverrideDefaultJavaPath=true
JavaPath=C:\Program Files\Java\
[Memory]
InitialHeap=512m
MaxHeapSize=8184m
[VMParams]
JvmParam0=-XX:+AggressiveOpts


results in the screenshot

Edited by Steveleeb

Share this post


Link to post
Share on other sites
[Runtime]
OverrideDefaultJavaPath=true
JavaPath=C:\Program Files\Java\jre1.8.0_231\bin\server
[Memory]
InitialHeap=512m
MaxHeapSize=2048m
[VMParams]
JvmParam0=-XX:+AggressiveOpts

JavaPath must point to the directory with jvm.dll or libjvm.so on linux

I haven't tested it with Java 10, just the Java 8 i had installed anyway.

Share this post


Link to post
Share on other sites

And to follow up from the PM: Java 10 is crashing because its missing the JavaFX libraries.

 

This exactly what I was expecting. WU is not prepared to run on Java 10. Someone with some skill can probably get it to run by adding the missing libraries to Java or WU. But I don't plan to sink any time into tinkering how to get WU to run in Java 10.

 

Hint: Search for how to get JavaFX on Java 10

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

The greatest fix so far, seems to be setting the min and max heap size as equal numbers.
[Runtime]
OverrideDefaultJavaPath=false
JavaPath=
[Memory]
InitialHeap=4096m
MaxHeapSize=4096m
[VMParams]
JvmParam0=-XX:+AggressiveOpts
JvmParam1=-Xms4096M
JvmParam2=-Xmx4096M


This seems to prevent the garbage collector from needing to run, the 4GB i've set it is just for experimental purposes, great if you have 16GB and run 3 chars in unison. Change the figure if you need to but keep them the same as each other.
The [Memory] section seemed to be ignored so i added the classic arguments as well.

Edited by Steveleeb

Share this post


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.