Java or C++?

Started by
11 comments, last by NerdyGnome 12 years, 2 months ago
The main reason C/C++ is the standard is because many early graphics libraries are in C. (I know there are earlier ones but for modern games' concern, it's C). C++ is an extension to C and therefore natural to adapt to from C.

Additionally, C++ is more efficient because it is closer to hardware due to its connection to C. Having said that, this does not mean Java is not efficient. Java have changed over the years and have become more and more efficient. However I think it is fair to say that C++ allows EASIER optimization and GREATER control over your code than Java. This is what I mean by "more efficient". With C++/C, you can literally fine tune your code to fit cache sizes; you may directly code assembly and force compilers to use your code instead of generate something that is potentially not optimized; finally Java makes everything into an Object which "forces" you to make MANY function calls... this mean that there will be a lot of stacks been made which lead to less efficiency when C++ is also OOP but less function calls (depends on developer).

Having said that, C++ also come with great price.... SO MANY BUGS! SO EASY TO MAKE BUGS because it is too powerful.

So Java is a good place to start and develop games for mobile and perhaps PC, but ultimately if you want optimization, it's C/C++

CXD
Youtube:
My Channel

Video Lessons:
Java Programming Lessons

Tutorials Written (Not-Active):
Introduction to A.I.
Advertisement
As has been said, you should learn multiple languages.
Focusing on just one may force you into a certain mindset of solving problems, when actually better methods exist in a different language.

For example, I don't like the "OOP or die" mentality of java and its usage of exceptions. Yet, the garbage collector is a great tool.
On the other hand c++ has RAII and is a multi paradigm language, which gives you great freedom of expression but it is riddled with legacy stuff, inconsitensies and (arguably) very ugly syntax.
A lower pay would not be a really big problem unless it's a really significant amount. Programming games as a hobby on the side sounds good too, I dont really know what to do at the moment. But seing as I have a couple of years left I will probably figure something out :D

This topic is closed to new replies.

Advertisement