字幕列表 影片播放
Should I learn Java or C++ for games? I can't figure out which is better.
Java wins hands down for web development and web based games.
I’m thinking of more than creating, cute but addictive Flash games.
C++ is better for embedded applications. If you write the game in Java, you or the operating
system will use C++ to control the audio and video.
Why?
C++ is regularly used for audio drivers, controlling a video card and otherwise generating the
sound and feel of a game.
C++ is hard. Java is popular with newbies.
Much to the detriment of the users. Java code is easy to maintain, which is also known as
fix. That’s what you get for a programming language eight out of ten programmers would
recommend teaching kids.
I heard that C++ has a lot more functionality, but that is only because it has been around
for thirty or so years. Java has better libraries.
That’s one reason why it is popular with new programmers. They can easily rely on libraries
to find code modules instead of having to write their own.
And Java is good for embedding scripts in a larger application.
Yeah, using C++ to control the hardware. Some of the top 3D games are written in C++ because
C++ is faster than Java and is the only way the graphics can keep up with the game player.
So what do I do?
Learn Java because it is easier and can get you into coding. Learn C++ over time to get
better game performance and, eventually, development of high end games.
Or I could learn JavaScript and Flash for those cute, addictive games you see for free
or a dollar a download.
You’ll live in your parents basement coding games instead of playing them. Learn Java
or C++ or both to actually make a living in gaming.