Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cwurts

java vs. C++

This topic is 5425 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Nobody has ever answered this question to my satisfaction. C++ is the standard for game development, but is there any good reason for this, other than circumstance? Is there anything java is lacking that would make it inappropriate for game development, and what would that be?

Share this post


Link to post
Share on other sites
Advertisement
most speed I believe simply due to the fact that c/c++ is lower level...

However Java is still very fast and supposedly easier to use and ideal for application development.

Share this post


Link to post
Share on other sites
quote:
Is there anything java is lacking

Expressiveness and a clear vision. It amuses me that C++''s templates were poked at for being unfriendly syntax-wise, and now Java 1.5 sports generics with the same syntax. Sun strikes me as the IT world''s Hamlet: always changing its mind and bitching about the current circumstances instead of actually doing something.

Sun''s insistance on non-native GUI widgets kills the platform for desktop apps IMO. Sure, there are toolkits to do it, but it''s more a case of too little, too late.

That and what always bugged me is usually there is one way to do things in Java but it is always considered elegant(tm) because it is the only way.

Share this post


Link to post
Share on other sites
quote:
Original post by Johnson5001
Java is a much slower language than C/C++ because it''s an intepreted language.

Wrong. Java bytecode is compiled on the user''s machine Just-In-Time, theoretically allowing additional optimizations at runtime that are not possible at compile time.

Share this post


Link to post
Share on other sites
quote:
Original post by Johnson5001
Java is a much slower language than C/C++ because it''s an intepreted language. It also has a greater footprint (in all aspects) compared to C/C++ application, thus made it not suitable in game development. You could write games in Java, just that no one will play it.


It still amazes me that such blantant ignorance is still being spewed around, especially since JIT has been around for a while now.

Share this post


Link to post
Share on other sites
I think C++''s speed and expressiveness win the day. Mainly the former. I don''t see a whole lot of expressiveness in Quake, you know.

Share this post


Link to post
Share on other sites
Java and C# are NOT interpreted! JIT is not the same as interpreted. JIT is not executing bytecode. Learn your facts before spewing these lies again.

Share this post


Link to post
Share on other sites
JIT is a variation of interpreted languages, though it''s much closer to native code than pure interpretation.

And, yes, Java is still slower than C++ in the areas where it matters for game development. You don''t need me to tell you this, though - write two identical programs, optimizing as best as you can for each platform (or not optimizing at all, same effect) one in C++ and one in Java, and then tell me which one performs better.

Java is not designed for speed-critical applications. It''s designed for multi-platform ease of use.

Personally, I prefer C# to Java for new generation languages, but that''s just me. You may find that Java suits your needs better.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!