Java or C++?

Started by
11 comments, last by NerdyGnome 12 years, 2 months ago
Hello, hopefully I wont get bashed too much for this question. I've been programming in Java for a while now and I started to get interested in programming games. I would love to get a job in the game industry and I've seen that C++ is pretty much the standard(?) there.
So now to my question; Should I start learning C++ to make games or keep programming java?

Worth to note: I've always wanted to be a java programmer or work in the game industry. Seeing as C++ is the standard language in the games industry my two interests kind of clash with each other.
I also don't want any heated arguments where people bash each other for their choice of language.
I just want to know if C++ really is the standard language in the game industry and if I should start programming in it if I want a job making games?

Cheers :)
Advertisement
Yes, C++ generally is the standard language in the game industry. Although, that being said, there are companies using C# and Java successfully to make decent games. Most notably Notch, who wrote Minecraft in Java.

I found Java programming pretty easy after being experienced with C++. While there are certain tricks, shortcuts, workarounds and techniques that are language-specific, the actual skill of programming games is something that caries over to any language or format.

My advice would be to use Java to write more and more complex games. Once you are extremely confident programming games in Java, start learning how to achieve the same results in C++. This way, you get to learn the complex systems of games in a language that you are comfortable with.

I just want to know if C++ really is the standard language in the game industry and if I should start programming in it if I want a job making games?

Cheers smile.png


It is the standard language for one segment of the industry (AAA PC/Console game engines), For other platforms or market segments the situation is quite different. Webbased games are almost never written in C++, All android games use Java (Allthough some load native modules written in C or C++), WP7 games all use C#, VB.Net or some other .Net language.

Outside of engine code quite many PC AAA titles are moving towards higher level scripting languages.

Thus: You don't have to know C++ to get a job making games but knowing it will increase the number of jobs you're qualified for (Same thing goes for most other languages), Learning multiple languages is never a bad idea. More importantly though, get a degree if you havn't allready (Not having a degree is far worse than not knowing C++ when going for your first job and any decent CS education will push you into picking up a bunch of different languages anyway).
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Personally I'd stick with the language you know Java and learn how to program games without getting tripped up by all of C++'s gotchas. A 5 second google came up with http://jmonkeyengine.com/ which looks like a fairly full featured game engine.

Good C++ code might be faster, but great art makes a game look good; without an AAA budget for an army of artists the speed benefits of C++ become academic.


Another option is learning the scripting language built into a game engine. Like the unreal engine: http://www.udk.com/
As some of the other posts stated, game development techniques are typically language independent.

There are plenty of very successful games that are made using languages other than C++.
These are usually web-based or mobile games, where platform-independent languages/IDEs really shine.
If those are the types of games you want to work on, you're fine with Java.

If you aspire to work on console or big PC titles, you will need to learn C++ at some point.
Much of the example code you find for various techniques will be written in C++, so a rudimentary knowledge couldn't hurt.
Personally, C++ is my favorite language. It has an admittedly steep learning curve, but it's well worth the effort.

You will probably wind up learning several programming languages, they are each useful for different things.

Best of luck!

You will probably wind up learning several programming languages, they are each useful for different things.
[/quote]
This. If you are going to have a career in software development, you will probably find you'll learn a dozen or more languages to varying degrees.

The real questions are 1) how experienced are you in Java and 2) how long before you are realistically looking for a job in the mainstream* game development sector.

A good measure for #1 is the size of the biggest project you have completed to date. If you haven't completed any big projects, I think you should concentrate on doing that first. The skill set required to solve problems as the project size scales up is different. You'll need to hone these skills if you want to become a good software developer, in any discipline. Having cool projects to show off can really help later on, too.

For #2, if you are young or starting out, I wouldn't worry about C++ yet - just get building cool stuff! However if you are in the middle or particularly coming to the end of a college degree and are hoping to join the mainstream* games industry afterwards, then perhaps you should be getting to know C++ now, and hope that you can get good enough at it to fulfil #1 to.

[size=2]* As others have mentioned, if you look outside AAA game dev you might find C++ is less critical a skill.
Thanks for all your help guys, I appreciate it. I think I will stick to Java for atleast a year or two and then start with C++.

As for rip-off's questions:

1) I'm not great, but not bad either. I've fiddled around with Java for many years but it was some time ago I decided to focus on it.
2) I'm in first year of college, so I have atleast 3 years before I willl look for jobs.

I was actually thinking of getting a job as a java programmer in the software industry after college. Maybe work there for a few years while doing some cool game projects on the side. After I've saved up some money and more experience from game making I'll try to look for a job in the game industry.
How does that sound?
I would dispute that most games are written in C++ these days, because I would factor in smart phones and slates. Having good Java skills is not to be sniffed at in the job market. I applied for a position with a game company that make Java based web games and was turned away because I'm mostly a C++ guy with little experience of Java (had some 10 years ago). I assumed I could just swap over no problem, but in their experience it's not quite so simple.

The way I would do it would be to hone and improve your Java skills and knowledge and then have some little project on the side for learning C++. Make it small, focused and something that interests you.

2) I'm in first year of college, so I have atleast 3 years before I willl look for jobs.


Then I wouldn't worry about it and I'd stick with getting better at programming in general with Java first. After all a lot can change in 3 years, both in your life and in the industry itself, so being a solid programmer is going to be more useful. By all means look into other languages as/when you feel ready (looking outside the 'C structured' family to things lik Python, Lua or a functional language like Haskell could be useful) but don't feel you must.

Not knowing C++ isn't a massive problem when you are new; I was hired at a games company at the same time as a 21 year old direct from uni guy who only really knew C# at the time. As it was a PS2 game we were working the C++ was more 'C with classes' but the guy could solve problems, got up to speed quickly and those of us around who knew more were happy to fill in the gaps in his knowledge. When I left the company about 2 years later he was part of the core team working on the 'next generation' in house engine.
If we look at all areas, it's long been the case that it would be unclear if C++ is the most popular. Practically all phones have been capable of running games for about 10 years, and the most predominant language is Java (last I saw, the claim was about 2 billion Java smartphone devices, and that was a few years ago). Also web based games will use various languages. Though that doesn't mean C++ is useless, especially if one is more interested in computers and consoles than handhelds or web.


I was actually thinking of getting a job as a java programmer in the software industry after college. Maybe work there for a few years while doing some cool game projects on the side. After I've saved up some money and more experience from game making I'll try to look for a job in the game industry.
How does that sound?
But would you then be prepared to take a pay cut?

I mean, it's natural that over those years, you would hopefully increase your salary as you gain experience. But if you want to switch to a games career, and keep that salary - yes on the one hand you'll have more experience, but on the other, you're now competing against people who have previous professional experience in the games industry. OTOH you could go in at an entry level graduate position, but that comes with the pay cut.

I can't help thinking, if you want to work in games, then try to do so from the start. OTOH, another option is to always work in another field using Java, and always keep games programming as a hobby. (Not a bad thing - that way you can keep games programming as something for fun rather than work; and you avoid the problems of lower pay / higher stress that are associated with some games companies.)

Not sure why you need to save up money?

http://erebusrpg.sourceforge.net/ - Erebus, Open Source RPG for Windows/Linux/Android
http://conquests.sourceforge.net/ - Conquests, Open Source Civ-like Game for Windows/Linux

This topic is closed to new replies.

Advertisement