This is probably an idiot question dued to my noobiness but I will keep on with it.
Since using Java looks like one of the causes of the resource sink that this game suffer, would it be impossible or suboptimal to port it to c++? I mean, with the game compiled wouldnt it run faster?
My gameplay its ok with a AAA+ computer, but with a low tier laptop wich plays ok League of Legends this game runs poorly, fps must be like 20 or so because its like "jumping" frames. I was thinking in installing it in a pentium 4 with 3 gigs of ram and a powerful Radeon (3 y old, but still competitive) but I'm pretty sure it will run even worse.
There is a serious issue with the performance.
Also, I'm having problems with java and the clients on a windows 8 updated laptop. The basic client runs well but the others close after logging while charging screen. They generate a log with the failures, should I post it or is it "dangerous"? I've thought in running it through a vm and a windows7, wich doesnt seem to give any kind of problem with java and its security, but this options would consume extra ram and resources and since this game requires so much I'm not sure it will work.
Any opinion?
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Java to c++??
Java is good. Changing client from java to c++ would basically mean total recode of it. No thanks.
Also, changing to c++ wouldnt guarantee devs would write some good performance code.
Also, changing to c++ wouldnt guarantee devs would write some good performance code.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
Sever
- Posts: 723
- Joined: Fri Aug 28, 2009 8:38 pm
- Location: Elsewhere
Re: Java to c++??
From what I've heard, Java takes 1.5x the amount of time to do things compared to C++. That's probably an average value of all possible instructions when comparing a cpu to the virtual machine. I doubt it is Java itself that is to blame for Haven's poor efficiency unless that number is way off.
People said the same about Minecraft, and then they actually optimized it. It made a big difference.
People said the same about Minecraft, and then they actually optimized it. It made a big difference.
Come back two hours earlier.
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Java to c++??
Exactly. Haven performance cant be compared to AAA games. Because their coders are usually way more skilled and they run on engines that are very well optimized. But i guess if polygons from stuff would be reduced greatly it would maybe give more performance. And textures quality lowered significantly. Like in some custom res pack.Sever wrote:From what I've heard, Java takes 1.5x the amount of time to do things compared to C++. That's probably an average value of all possible instructions when comparing a cpu to the virtual machine. I doubt it is Java itself that is to blame for Haven's poor efficiency unless that number is way off.
People said the same about Minecraft, and then they actually optimized it. It made a big difference.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
Myzreal
- Posts: 69
- Joined: Sun Jul 03, 2011 5:32 pm
Re: Java to c++??
You've heard wrong. That might have been the truth in early Java days, but nowadays the JVM has some very powerful optimizations in place, making the bytecode run comparably to native code in most scenarios.From what I've heard, Java takes 1.5x the amount of time to do things compared to C++
Rewriting the client doesn't make any sense and it would not run on Linux and Mac.
Paste me to get hacked: http://a/%%30%30
-
pedorlee
- Posts: 1321
- Joined: Sat Feb 04, 2012 10:36 pm
Re: Java to c++??
That sounds right.Myzreal wrote:You've heard wrong. That might have been the truth in early Java days, but nowadays the JVM has some very powerful optimizations in place, making the bytecode run comparably to native code in most scenarios.From what I've heard, Java takes 1.5x the amount of time to do things compared to C++
Rewriting the client doesn't make any sense and it would not run on Linux and Mac.
Java compiles in real time, it cant be as fast as a previously compiled program per definition. Show me why I'm wrong.
-
Sevenless
- Posts: 7704
- Joined: Fri Mar 04, 2011 3:55 am
- Location: Canada
Re: Java to c++??
These days, java is unpopular for game design primarily due to convention and lack of libraries tailored to coding games. That and the whole JVM security issue which has made some coders a little wary of it.Myzreal wrote:You've heard wrong. That might have been the truth in early Java days, but nowadays the JVM has some very powerful optimizations in place, making the bytecode run comparably to native code in most scenarios.From what I've heard, Java takes 1.5x the amount of time to do things compared to C++
Lucky: haven is so quirky
Lucky: can be so ugly, can be so heartwarming
Sevenless: it is life
The Art of Herding
W16 Farmer's Almanac
W16 Casting Rod Cheatsheet
Explanation of the logic behind the cooking system
Lucky: can be so ugly, can be so heartwarming
Sevenless: it is life
The Art of Herding
W16 Farmer's Almanac
W16 Casting Rod Cheatsheet
Explanation of the logic behind the cooking system
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: Java to c++??
Mostly, it depends on the code, and poorly written C/C++ code is going to be slower than properly optimized Java code. I think in the best case scenarios, native code runs a few percentage points faster, but that means both bases are properly optimized and such.Myzreal wrote:You've heard wrong. That might have been the truth in early Java days, but nowadays the JVM has some very powerful optimizations in place, making the bytecode run comparably to native code in most scenarios.From what I've heard, Java takes 1.5x the amount of time to do things compared to C++
The client is just in need of a lot of optimization, and there's a ton of bugs and other things to fix on top of that.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
mamotromico
- Posts: 184
- Joined: Wed Aug 19, 2015 10:25 pm
Re: Java to c++??
whatMyzreal wrote: it would not run on Linux and Mac.
-
Sevenless
- Posts: 7704
- Joined: Fri Mar 04, 2011 3:55 am
- Location: Canada
Re: Java to c++??
It wouldn't run without some specific optimization effort if I remember correctly. Supposedly for java you only need one set of code.mamotromico wrote:whatMyzreal wrote: it would not run on Linux and Mac.
But hey the game doesn't really run on macs right now anyway so it's not that different XD At least not without some effort.
Lucky: haven is so quirky
Lucky: can be so ugly, can be so heartwarming
Sevenless: it is life
The Art of Herding
W16 Farmer's Almanac
W16 Casting Rod Cheatsheet
Explanation of the logic behind the cooking system
Lucky: can be so ugly, can be so heartwarming
Sevenless: it is life
The Art of Herding
W16 Farmer's Almanac
W16 Casting Rod Cheatsheet
Explanation of the logic behind the cooking system