Java Versus C++

Moderator
Posts: 624
Joined: 2007.09
Post: #1
I am a 12 year old guy who has ambitious dreams of being a Game Programmer/Designer when I grow up, thus I figure the sooner I start learning the better. However, I am not sure which programming language to start with. I am learning HTML, and have dabbled in REALbasic, but want to get into something like Java or C. My question? I want to know which I should start with. My dream is not to make a game by age 13; rather to learn and learn until I'm ready to make a good, high quality game. That said, I won't mind making Pong and tetris to learn the language… So, which one should I learn first C, C++, or Java. Or whatever else there is.

Hope this makes sense,

Lincoln Gren
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #2
There really isn't a clear-cut answer to this. Those languages all come from the same family, so once you've learned one of them, you practically know the rest. I'm inclined to recommend starting with C, because it's in many ways the simplest of the three, though there is some low-level memory stuff you'll have to do that you wouldn't in Java. I found Java to be a lot less intuitive when I was learning it than when I learned C, but your mileage may vary.

Here's the usual C book recommendation: http://www.amazon.com/Programming-Langua...028&sr=8-2

Good luck!
Quote this message in a reply
Moderator
Posts: 683
Joined: 2002.11
Post: #3
I say, go with Java. I recommend checking out Processing, an easier version of plain Java. It does not have any fewer features or diminished power, but there is a gentler learning curve. There are many tutorials for it, and an active, helpful discussion board.

Once you have Java down, C(++) shouldn't be much of a problem.

I'm sure others will have other opinions, and they are probably equally valid. What I have just described is the approximate path I am on right now.

My web site - Games, music, Python stuff
Quote this message in a reply
Member
Posts: 204
Joined: 2002.09
Post: #4
First I'd like to congratulate you on your post, which is both well spoken and well reasoned.

I always suggest learning C first, but as other's have pointed out there is no clear cut answer.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #5
It's really a matter of opinion.

Java is a fairly easy language to learn, and it protects you from making a lot of confusing mistakes. It's cross-platform, and has graphics and user interface libraries built in. Eclipse is a pretty powerful Java IDE (if you can stand the awful awful GUI). Not a bad language to start with.

C is simple and efficient, and fairly low level. You'll end up writing a fair bit of code to do things that are given to you for free in Java or C++. C is not your friend when you make mistakes. There are a lot of things that you can do in C (most because of pointers) that will cause hard to find errors.

C++ is C with more features really. I don't think many would disagree that it is the most complicated programming language in existence. Like C, it's not your friend when you make mistakes. The advantage of C++ over Java is mostly additional features and speed. Probably not that alluring for a beginner.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #6
Thanks for the quick replysSmile Is there a difference between C++ and Objective-C?
Sorry about my dumb questions, but I grew up on Mac OS, so I am in total darkness when it comes to programming.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #7
A lot of people recommend pygame as a learning platform. Python is an easy language, and pygame makes it easy to push pixels around.

It's harder these days for young folks to dive in. Modern computers are incredibly complex, and modern operating systems sandbox everything through complicated layers of abstraction. Old timers like me wish there were more platforms for young folks to safely experiment with.

http://www.pygame.org
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #8
SmileI'll check that out. Thanks!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
Objective C is some simple object-oriented extensions to C based on SmallTalk. It's basically only used by Apple. The extensions are nice, and Objective C is a strict superset of C (so all your C code compiles as Objective C).

C++ is a new language based on C, with some object-oriented concepts. It is quite possibly the most complicated programming language in existence. It is much more widely used than Objective C by accident of history. It is not a strict superset of C (most C code requires small modifications to compile as C++).

If you're just starting out, Java (1.4, not 1.5) is a very simple language that insulates you from a lot of the worse mistakes you can make in a language like C, and gives you helpful messages for most mistakes. I'd recommend it as a starting point. If you want to make games, there's LWJGL which gives you access to OpenGL, easy texture loading, etc.

C is an important language to know... eventually. I don't really see the benefit to learning it off the bat. Once you know one imperative language, all the others are very similar, so with Java under your belt you can learn C with an emphasis on the additional complications it introduces, and it won't take you long at all.

If you want to program games for the Mac, you'll want to know Objective C eventually. I'd learn that after C.

I'd avoid learning C++ as long as humanly possible.
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #10
Thank you all for your advice. I think I'll go with Java or Python for now.

And again, a very big Thank You!!! (Actually a Bold, Italic, and underlined thank you)

Lincoln Green, a.k.a Hairball183
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #11
Java or pygame might be alright, although I'm not much of a fan of Java.

As already noted, C++ is by far the most widely used language in AAA game development so that's *eventually* what you'll need to learn. Some of us love it and some of us despise it. Maybe by the time you get to college things will have changed and you won't have to learn it, who knows? At any rate, to get to C++ you still have to learn C first and I think I agree that learning C first might not be the best thing to do anymore, unless you have the patience and are willing to wait a while before you get to end results.

If I were starting out now I might consider a two-pronged approach. I'd try out something like pygame or a BASIC variant, and at the same time I might invest in Unity and start learning C# using that. If you can learn C# then you'll know a great deal about how C/Ob-C/C++ and even Java work. If you have good success with learning C# under Unity then I'd say ditch all the other stuff and go with that exclusively. Learning C# will also allow you to develop on XNA if you want to make games for the Xbox 360 or Windows platforms. It's really sweet stuff! The only catch is that I don't know how hard it would be for a beginner to pick up C# through Unity.

Otherwise you'll have to trudge along forever learning C then OpenGL and Obj-C like many of us, and that isn't really all that easy. Not impossible, but not easy.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #12
I just remembered you already use Cheetah3D, and the easiest way to use the stuff you create there would definitely be through Unity. I can't think of anything else for games that uses fbx on the Mac other than Unity right now. You will likely be able to use the .obj file exports with stuff other than Unity, but that means you won't be able to use any skeletal animation.
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #13
I think I'm going to be forced to do it the hard way. A twelve year old has a hard time getting 250 bucks together.RaspLOLNinjaMad
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #14
A big problem with starting programming is that windowing-drawing-sound libraries are generally pretty hard to use for a beginner.

While you can program the "logic" of a simple game with just the bare basics of programming (variables, loops, conditional statements) using the libraries above will require working knowledge of functions, pointers, objects etc. as well as going into the intricacies of the libraries themselves.

Myslelf I didn't want to learn all this stuff before making something, it looked unnecessary.

If you want fast results try TNT Basic http://tntbasic.com/ which is free and very easy, or blitzmax (30 days free) http://www.blitzmax.com/

Once you have made something cool move along to learn new stuff Wink

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #15
There is a fair amount of truth to Najdorf's post.

I started programming in Hypercard when I was 9 or 10 maybe. Hypercard had a really low barrier to entry. Getting graphics and some basic UI components on the screen required no programming experience whatsoever. It had a very easy learning curve that allowed you to learn its programming language a little bit at a time.

By the time I was 12 or 13, Hypercard was already starting its decline, and I was looking for something new. I got a book on C, read it cover to cover, and bought the "learning" version of Codewarrior (or whatever it was). I understood how to make functions, use all the control structures, and do some basic text input/output. I figured it was time to learn how to make some real Mac programs. I pretty much ran into exactly what Najdorf was saying, there was a mountain of stuff you had to know in order to do what I had thought of as "simple" in Hypercard. Opening a window, drawing with Quickdraw, Soundmanager, getting input, etc. I could make some basic/crummy examples, but I was frustrated by how much more difficult it was to do the things that I was able to do in Hypercard. I probably gave up on C until I was 17 and started dabbling with Linux.

Had I known of a good way to communicate with other more experienced developers, things probably would have been different. As is, my only source of information was the books I had. If only I had known of some sort of "forum" where I could ask all of the silly questions that had to be asked... (hmmm)

Long story short, if you do find that you are loosing interest for similar problems, fear not. Simple programming environments still do exist. They tend to be the sort of thing that you will eventually outgrow, but they are still a good place to start.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply