C++, Java (C##) and the old question of speed
C++, Java (C##) and the old question of speed
In the first years java was a totally interpreted language. Therefore it used to be very slow because there was this run-time engine using large part of the cpu-time. Lots of the old "java is slow" prejudices come from this time. Nowadays java runs on a so called just-in-time compiler, this means before a statement is used it is transformed into the needed machine dependent instructions. This approach gave java a large speedup, so I guess now it would be possible to run a game with java. Especially, not every game really needs the last bit of performance.
As far as I know C++ is still faster, but I think this is only a question of time, the same arguments are valid for C##.
One argument for java (and C##) is that their object-oriented concepts are much "cleaner" than the ones in C++. With C++ you can do really nasty things, consider void pointers and the memory management as two examples. C++ gives you great freedom which means great possibilities..or great danger...
As far as I know C++ is still faster, but I think this is only a question of time, the same arguments are valid for C##.
One argument for java (and C##) is that their object-oriented concepts are much "cleaner" than the ones in C++. With C++ you can do really nasty things, consider void pointers and the memory management as two examples. C++ gives you great freedom which means great possibilities..or great danger...
np, I was only joking anyway since I was the centre of most of em.
I know Java has a use and a place, but most of other peoples arguements seem to consist of "Java is great, how dare you say Java is just an offshoot of C". Fact is that Java was conceieved from C, they took the idea, used it for a very simple application and it is grown from there. It may well be faster now, it may well be closer to Assembly language now but it is still behind C++ ( from actual research I have done into the two languages, the thing even people use it have failed to do ) in the way it goes about things. From what I have found, Java is great for web applications and a few other things but it simply isn't as suitable for large scale projects such as game projects.
The only "proof" I have seen to the contray ( this includes more than this forum as well ) is someone here saying that the flying game IL2 was written partly in Java ( which I have confirmed from looking at the DLL's, not sure how much was witten in Java ). That's the game that eats system performance to do very little, the game that is slow even with all the settings down to minimum. Great endorsement! I don't mind Java, but I still think ( with a lot of others ) that it simply isn't on the same level as C++ and quite possibly will never be.
I think the arguement about C++ being really advanced but possible to really screw up are one and the same. You can take away all those dangers but by doing so you are probably going to take away the versatility of the language.
C# is interesting, however I don't know many projects are actually using them. I think if something like Q4 or HL3 will use it then other developers will be forced to learn it but until a widely used engine decided to convert I can't see it taking off. I don't really know enough about it but it seems like an easier to use version of C++, much less code to do the same things and a some additional features.
I know Java has a use and a place, but most of other peoples arguements seem to consist of "Java is great, how dare you say Java is just an offshoot of C". Fact is that Java was conceieved from C, they took the idea, used it for a very simple application and it is grown from there. It may well be faster now, it may well be closer to Assembly language now but it is still behind C++ ( from actual research I have done into the two languages, the thing even people use it have failed to do ) in the way it goes about things. From what I have found, Java is great for web applications and a few other things but it simply isn't as suitable for large scale projects such as game projects.
The only "proof" I have seen to the contray ( this includes more than this forum as well ) is someone here saying that the flying game IL2 was written partly in Java ( which I have confirmed from looking at the DLL's, not sure how much was witten in Java ). That's the game that eats system performance to do very little, the game that is slow even with all the settings down to minimum. Great endorsement! I don't mind Java, but I still think ( with a lot of others ) that it simply isn't on the same level as C++ and quite possibly will never be.
I think the arguement about C++ being really advanced but possible to really screw up are one and the same. You can take away all those dangers but by doing so you are probably going to take away the versatility of the language.
C# is interesting, however I don't know many projects are actually using them. I think if something like Q4 or HL3 will use it then other developers will be forced to learn it but until a widely used engine decided to convert I can't see it taking off. I don't really know enough about it but it seems like an easier to use version of C++, much less code to do the same things and a some additional features.
I don't know a single thing bout coding...but working as gfx man at company , and the meals with mates were quite clear bout it...all crys and laments for using Java and not c...or c++.While they all were java freaks.Just making something like moving huge pixels in screen, even in 2d, was WAY slower, specially in Linux...for some reason, for then (a year ago or more) the windows java thing was faster in redrawing... even so, slower than a c compiled dx game in pc...
There are of course limits limited with hardware, but basicly, they could not get very low for performance and not breaking compatibilty and dunno what more things...also for the way java works...yets so, was better for them for having all coed organzied and all, seems is extremely good for much stuff; not so good for full blown pc-like games...
There's some engines in Java, that seem doing good...Can't remember the names...
I think they use libraries, based in open gl...JOGL, and LWGL (lightweight library or something) ...soe there's this low level access library, and then game engines...basicly I was seing one as the best , dunno the name now...
but there are some. I am told it always depend if u compile for an specific machine using certain compilers (kafee?) but then u loose compatiblity and dunno what else.
eck.What the heck is a gfx person doing answering here...
There are of course limits limited with hardware, but basicly, they could not get very low for performance and not breaking compatibilty and dunno what more things...also for the way java works...yets so, was better for them for having all coed organzied and all, seems is extremely good for much stuff; not so good for full blown pc-like games...
There's some engines in Java, that seem doing good...Can't remember the names...
I think they use libraries, based in open gl...JOGL, and LWGL (lightweight library or something) ...soe there's this low level access library, and then game engines...basicly I was seing one as the best , dunno the name now...
but there are some. I am told it always depend if u compile for an specific machine using certain compilers (kafee?) but then u loose compatiblity and dunno what else.
eck.What the heck is a gfx person doing answering here...
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
c++ advanced features are part of the speed...
c++ gives the coder the ability to access anything, with a minimum of rules. Its like the code equivalent of ROOT. part of what makes it so fast is the ability to do thoroughly unwise and low-level memory things like "delete" and "memcopy" (which both to be honest, are really carry-overs from c, in fact stroustrup advises AGAINST using things like this in "the c++ programming language", and encourages coders to use OO style code as much as is possible because its is arguably cleaner and more fail-safe)
regardless of whether it is wise to use them, these things are possible in c++, and NOT possible in JAVA.
my issua with java, would moreso be about the lack of really good support for 3d avaiable. i have seen a few simple java OGL bindings, but none of them was very easy to use, most were also only partial and incomplete.
now if somebody figured out how to make a fully functional irrlicht binding for java, i might use it, but since i havent heard of one yet, i will stick ot c++
-ted
regardless of whether it is wise to use them, these things are possible in c++, and NOT possible in JAVA.
my issua with java, would moreso be about the lack of really good support for 3d avaiable. i have seen a few simple java OGL bindings, but none of them was very easy to use, most were also only partial and incomplete.
now if somebody figured out how to make a fully functional irrlicht binding for java, i might use it, but since i havent heard of one yet, i will stick ot c++
-ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Chrome was written in Java and it's a latest generation kind of game. Its performance is flawless and they got huge outdoor levels full of vegetation and oceans and stuff.
I'm not saying Java is better, but that there's another stream of programmers who have already gone far in 3d graphics with java.
http://www.chromethegame.com/en/index.html
I'm not saying Java is better, but that there's another stream of programmers who have already gone far in 3d graphics with java.
http://www.chromethegame.com/en/index.html
Chrome wasn't written in Java. It uses it only as a scripting language.
Tomasz Nowakowski
Openoko - www.openoko.pl
Openoko - www.openoko.pl
C# is a really great language and fast enough to write great games.
Although I know that C# has still a few weak points, I'm convinced that in a few years C# will be used for many games
Have fun and greetings to Niko,
Bunnz
Visit: http://purplesharp.sourceforge.net
Purple# - a shader driven 3d engine for .NET
Although I know that C# has still a few weak points, I'm convinced that in a few years C# will be used for many games
Have fun and greetings to Niko,
Bunnz
Visit: http://purplesharp.sourceforge.net
Purple# - a shader driven 3d engine for .NET
> so Chrome is C++ (+) Java?
> didn't know
> so what r all those java scripts for?
For scrpipting It is used for such things as models information, AI procedures, mission scripting and more.
> didn't know
> so what r all those java scripts for?
For scrpipting It is used for such things as models information, AI procedures, mission scripting and more.
Tomasz Nowakowski
Openoko - www.openoko.pl
Openoko - www.openoko.pl