Find out if games are actually programmed in Java, ie. talk to game
programmers.
No. Note that for certain popular game platforms - e.g., ps2, xbox,
gamecube, gba, there is no availible java implementation. So as
far as games are concerned, Java is 'write-once, and then re-write
from scratch in C++'.
If the answer is yes do Java since it is more than just a language it
comes with an enormous number of tools that can be used very easily.
Do your java tools come with a profiler? A profiler is essential for
modern action games.
In C++ you have to acquire libraries and although this is possible you
have to find out how to install them and link against them which are
issues which you don't have with Java.
If you think you don't have to understand those issues Java, I wonder
how you would fare if you had to write a large Java
application. Probably you come to hide under the table in terror
everytime you had a class path problem.
While you can draw something on the screen immediately in Java once
you understand the use of classes in Java it will take much more
effort in C++.
I don't think you know what you are talking about. First, drawing on
the screen has nothing to do with classes. Second, it is
impossible to draw on the screen in C++; the C++ standard contains
no mention of any such thing. You must use OpenGL, driectX, or
other platform-specific library. (Possibly one implemented by you
in assembler and video-chip microcode
C++ as a language is probably 3 times as extensive and complicated as
Java.
Why do you say 3? (I'd say 'an order magnitude' - a phrase which is
intended to convey both a great difference and an inability to
measure the difference precisely.
Moreover the problem is not only the language but also the tools which
are needed to build (compile and link) a program and what sort of
error messages these tools produce. If you can't handle these tools
you won't ever get to the level where there is any difference between
C++ and Java and certainly not to the point of programming games. You
will not have code that executes.
This process is much simpler in Java with decent error messages that
tell you what goes wrong and where. In C++ you might see
"program was terminated since SIGNAL 11 (segmentation fault) was
received".
Where? Why? What? ----- you find it out and learn how to use the
debugger.
No. You learn to review code. If you do not review your C++ code it
will not work - there all kinds of errors one can make in C++ that
will sneak right past your debugger.
Linker errors in C++ are ultimate horror:
"In function <incomprehensible string, seemingly unrelated to your
program> undefined reference to <ghastly string, 1000 characters all
on one line, scroll right for minutes>".
I'm glad it's been 3 years since I had to use a C++ environment whose
linker dumped mangled names at me. Today, it seems every C++
implementation I have has name-demangling linker.
Sometimes the function where supposedly the undefined reference
occured is one you have never heard of, the file resides in a
directory you did not even know existed and when you look it up there
surely is no reference to your function at all.
I have certinaly seen some bad error message, but none of this sort.
It will take a long time until you can even read these error messages.
It is very daunting.
It is better to read the code. The answer is usually there. Only read
the error message when you are convinced you cannot find it in the
code.
I have dealt with programs consisting of about 100 classes without
ever using the debugger in Java. I have also written and compiled
classes that compiled right away and worked correctly. That has never
happened to me in C++.
I am about 3 times faster in Java than in C++.
If you know Java so much better, what are you doing here?
On the other hand C++ is the pinnacle of programming languages
No language is 'the pinnacle of programming languages'. Many have
erroneously claimed to be, but C++ never has - even Bjarne
Stroustrup has said such things as 'if you like smalltalk, go use
it', 'if you need garbage collection, other languages have it,
maybe you could use one of those' and 'C++ shouldn't try to be all
things to all people'.
and it
produces very fast code. It also forces extreme discipline on you
otherwise you won't make it. Plan on programming sessions lasting 20
hours and longer.
[snip]
20 hours? Bad, bad, _*BAD*_ advice. No. To write working C++, you must
have a clear and alert mind. You must not overlook small
details. Very few people are clear and alert for 20 hours at a
time. In fact, I strongly advise no more than 2 (yes, 2!) hours
between breaks, and no more than 8 hours (yes 8!) a day of solely
programming. If you are working 16 or 20 hours a day, your excess
hours are usually better spent in design, documentation, study,
or code review.