Java or C++?

Started by
43 comments, last by rip-off 12 years ago
Hey guys.

Im new to programming. I only started learning about a week ago. My plan was to go through Java and then move on to C++. My goal is to be able to make games (all sorts of games for all sorts of platforms).

I was just wondering if I should bother with Java or just skip it and go straight to C++?

When dealing with engines such as Unity, Cry-engine and the UDK is Java at all useful to know?
Advertisement
Look at the last post.

For the record, I will say that if you're new to programming, do not start with C++. It's a beast of a language.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
This really depends on what your goal is. If you want to target many platforms as you want, I would said go for Java. But it seems you want to use those engines, most of them have their own scripting language and have an API in C++,. So better learn C++ if you want to use them.

Personally, I would say start with C++ because there is no great difference between the two languages from beginner's perspective. Since you are going to learn them from the very beginning anyway. And select one platform first for your initial project before targeting another platform.
I do not think you should skip anything in favor of C++. It's a terrible starting point. I'm not fond of Java and would push for Python or C# instead, but definitely not C++.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
C++ will burn you and make you regret things. You need a fairly deep understanding of various concepts, including all the nasty little dark corners of memory management, before you should take it on.

C# and XNA is a commonly recommended good starting point. I've no direct experience of it but from what people who's opinions can be trusted say, I'd support that recommendation. For now your ambition of "all sorts of platforms" is too much. You need to focus on just learning and understanding how the basic things work, and piling multiplatform on top of that is just going to make things more difficult. Instead getting something that will work well on a single platform, and that does a lot of the messy heavy lifting for you, will be better in the longer run.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I'd also recommend Python over Java and C++. Python is designed to be beginner friendly and easy to code in.
I trust exceptions about as far as I can throw them.
Even though Python is designed to be user friendly (which i still doubt), its syntax is very different than C++ or Java.
Therefor i would suggest you to go on either C# or Java, then move on to C++.

Both C# and Java are taking care of alot of programming aspect for you already, so you can skip things and keep learning, and when you feel ready, you can start learning C++ and learn all those "dark corners" as mhagain has mentioned.

Good luck.
Thanks for all the help guys. :)
I was in same limbo years ago, when I just started with programming in college. The thing that I learned is, you should learn a language that helps you to understand important concepts in Computer science ( such as OOP) faster and easier. So if you go with C++ at this stage it will be harder (painful in fact) for you instead of Java or C#.

Personally I suggest to start with C# or Java to learn important concepts and after that you can switch to C++ (with much better perspective) anyway you can also start with some framework such as XNA (C#) to get familiar with concepts and techniques in a game software (such as collusion detection or applying basic AI). At the end all C++, C# and java are from C family so they share lots of thing with each other so it will be easy for you to jump from C#/java to C++.

cheers

Even though Python is designed to be user friendly (which i still doubt), its syntax is very different than C++ or Java.
Therefor i would suggest you to go on either C# or Java, then move on to C++.

Both C# and Java are taking care of alot of programming aspect for you already, so you can skip things and keep learning, and when you feel ready, you can start learning C++ and learn all those "dark corners" as mhagain has mentioned.

Good luck.


Java syntax is also very different from C++. C# is a lot closer. But I don't think there's a problem anyway. If you're going to C++ from a managed language, you're going to have to relearn a lot anyway, so a different syntax doesn't make things any harder. And it might even be an advantage because it stops you from trying to just do the same things, which is usualy a bad idea. (Ever seen Java coders write C++ which is full of void pointers and pointless dynamic allocations everywhere)?
I trust exceptions about as far as I can throw them.

This topic is closed to new replies.

Advertisement