Java to c++??

General discussion and socializing.
User avatar
MagicManICT
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: Java to c++??

Post by MagicManICT »

mamotromico wrote:
Myzreal wrote: it would not run on Linux and Mac.
what
Sevenless wrote:It wouldn't run without some specific optimization effort if I remember correctly.
Case in point, code written to run under Windows vX wouldn't run on Linux or Mac or any other platform period. Even using version specific libraries can make running on older or newer version of a system impossible (which is why Windows and many others support backwards compatibility). Porting the code would absolutely be required, which means an extensive amount of dev time to create the extra clients and extra time to do maintenance and bug fixes in the clients.

Now, there are managed solutions out there that will automatically generate code for any platform supported in any of the languages the development suite supports, but I don't know much about performance and real portability. (I was recently looking at the latest version of Visual Studio and it will do this.) For those of you out there thinking of things like Unity, Unity is a managed platform just like Java and the company manages compatibility issues so that any code written for Unity should run on any platform Unity is built to run on.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
mamotromico
Posts: 184
Joined: Wed Aug 19, 2015 10:25 pm

Re: Java to c++??

Post by mamotromico »

Sevenless wrote:
mamotromico wrote:
Myzreal wrote: it would not run on Linux and Mac.
what
It wouldn't run without some specific optimization effort if I remember correctly. Supposedly for java you only need one set of code.

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.
Well yes it would need some specific IF they use platform-specific libs.

But yeah, its in no way feasible to do it.
User avatar
Sever
Posts: 723
Joined: Fri Aug 28, 2009 8:38 pm
Location: Elsewhere

Re: Java to c++??

Post by Sever »

Come back two hours earlier.
User avatar
Ferinex
Posts: 1040
Joined: Sun May 31, 2009 9:05 am
Location: Miami

Re: Java to c++??

Post by Ferinex »

pedorlee wrote:
Myzreal wrote:
From what I've heard, Java takes 1.5x the amount of time to do things compared 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.

Rewriting the client doesn't make any sense and it would not run on Linux and Mac.
That sounds right.
Java compiles in real time, it cant be as fast as a previously compiled program per definition. Show me why I'm wrong.
You're wrong. Java is able to take advantage of platform-specific optimizations on the fly, based on the host machine. Pre-compiled code can not do this; it would need to be recompiled with those platform specific optimizations for each platform.
i guess they never miss huh
Glorthan
Posts: 1099
Joined: Tue Jun 11, 2013 4:33 pm

Re: Java to c++??

Post by Glorthan »

I had a lot to write here, but I decided a simple answer is best.

The main benefit from moving to a compiled client would be drastically reduced memory consumption, which would help with multiclienting. On a fairly new system, the cpu power should adequate to run the game, however there is a large disparity between integrated graphics and discrete, so those having client issues without a complete dinosaur of a computer would probably be best served by optimising the opengl code to make the gpu load lighter, which is largely unaffected by the programming language used.
User avatar
shubla
Posts: 13041
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Java to c++??

Post by shubla »

Glorthan wrote:I had a lot to write here, but I decided a simple answer is best.

The main benefit from moving to a compiled client would be drastically reduced memory consumption, which would help with multiclienting. On a fairly new system, the cpu power should adequate to run the game, however there is a large disparity between integrated graphics and discrete, so those having client issues without a complete dinosaur of a computer would probably be best served by optimising the opengl code to make the gpu load lighter, which is largely unaffected by the programming language used.
Maybe somone could make low polygon/resolution res file? I guess it would improve GPU load a bit?
Image
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
User avatar
nekomarisa
Posts: 43
Joined: Fri Aug 28, 2015 11:43 pm

Re: Java to c++??

Post by nekomarisa »

You mean java to C :^33

http://i.comfy.moe/zrhefy.png

Could tweak it to be a game client; maybe with SDL or something. Have little experience with OpenGL, though. Community project?

Issues moving to C++ would include platform specific issues, which are a headache to debug. And it's not necessarily that much faster than Java, these days.

I think the existing Java client can be optimized a bit more.
shubla wrote:
Glorthan wrote: Maybe somone could make low polygon/resolution res file? I guess it would improve GPU load a bit?
Could try making one of those low poly esque texture packs for the game. Not sure if that'd help.

I think some of the old resource layer tools should still be compatible with the image layer resources of the game. (textures are their own layer now. not sure if that's a new layer. didn't client dive during last world)
User avatar
Koru
Posts: 344
Joined: Sat Aug 07, 2010 11:06 am

Re: Java to c++??

Post by Koru »

Writing bad renderer in java or c++ does not change anything. I would suggest using engine like UE or Unity, but I guess devs like to make all with their own hands ;).
User avatar
shubla
Posts: 13041
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Java to c++??

Post by shubla »

You cantryrecode client to c++. Current cient is all open source ¦]
Image
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
Glorthan
Posts: 1099
Joined: Tue Jun 11, 2013 4:33 pm

Re: Java to c++??

Post by Glorthan »

nekomarisa wrote:Issues moving to C++ would include platform specific issues, which are a headache to debug.
Such as? Unless you use compiler specific extensions, which is stupid for a crossplatform release. Just stick to standard c++98 or c++11, and use a library like QT or SDL and there won't be issues... It's no easier than C to make crossplatform (this isn't the 90's/early 2000's where nobody has compliant compilers).

That being said, a C++ client wouldn't be very beneficial, I agree. Just don't understand the C zealotry.

Return to “The Inn of Brodgar”