When/Why to Move to C++?

Started by
57 comments, last by swiftcoder 12 years, 7 months ago
First let me say that it's strange to ask a question and have 'C++' be the last word (or have it in a quote). "C++?" looks weird. Anyway, on to the questions (kind of).

Background follows this sentence. 2 years ago I took a programming class at school (freshman year of high school) that used VB.Net. I didn't really like VB.Net too much. Last year I did AP Comp Sci (Java) and liked it a lot more. Now it's been about a year that I've been doing Java. I've made a couple simple clones (Pong, Space Invaders-ish game, etc) and made a game that I used to play on my calculator (TI 89) all using Swing. I've recently looked at the Slick2D library and started using it to remake my game. It's a 2D game somewhat similar to Space Invaders but better (Sounds like nonsense I know - nothing is better than Space Invaders).

That covers the background. I've heard a lot of people all over the place though, admittedly, mostly on the internet saying that C++ is used more widely in the gaming industry. I've also heard that beginners shouldn't start in C++ (I just can't put punctuation directly after C++). I haven't taken stock in the common Java myths (Java is too slow, Java can't handle graphics, etc) but do believe that C++ is used more widely. My main questions are: why switch to C++ and how much programming experience should I have before starting in C plus plus? (Work-around :))

I'm planning to do some research into C++ and games both independent of each other and together. I just thought I might get some faster results posting here. I realize that this topic may seem a bit long so I really appreciate your time in reading (and hopefully replying to) this topic.
Advertisement

First let me say that it's strange to ask a question and have 'C++' be the last word (or have it in a quote). "C++?" looks weird. Anyway, on to the questions (kind of).

Background follows this sentence. 2 years ago I took a programming class at school (freshman year of high school) that used VB.Net. I didn't really like VB.Net too much. Last year I did AP Comp Sci (Java) and liked it a lot more. Now it's been about a year that I've been doing Java. I've made a couple simple clones (Pong, Space Invaders-ish game, etc) and made a game that I used to play on my calculator (TI 89) all using Swing. I've recently looked at the Slick2D library and started using it to remake my game. It's a 2D game somewhat similar to Space Invaders but better (Sounds like nonsense I know - nothing is better than Space Invaders).

That covers the background. I've heard a lot of people all over the place though, admittedly, mostly on the internet saying that C++ is used more widely in the gaming industry. I've also heard that beginners shouldn't start in C++ (I just can't put punctuation directly after C++). I haven't taken stock in the common Java myths (Java is too slow, Java can't handle graphics, etc) but do believe that C++ is used more widely. My main questions are: why switch to C++ and how much programming experience should I have before starting in C plus plus? (Work-around :))

I'm planning to do some research into C++ and games both independent of each other and together. I just thought I might get some faster results posting here. I realize that this topic may seem a bit long so I really appreciate your time in reading (and hopefully replying to) this topic.


There is no good answer to these questions really, languages are just tools.

Since you've made a few games allready you should have enough programming experience to be able to pick up pretty much any language.

Almost noone "switches" to C++ , an experienced programmer will know and use multiple languages, C++ is a good language to know and it is quite heavily used in many fields but there are plenty of other languages you should take a look at aswell at some point.
[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!
Thanks for the reply. Good point about never switching as one should certainly be competent in more than a single language. I was meaning switching between main or, if you will, preferred langages.
Thanks for the reply. Good point about never switching as one should certainly be competent in more than a single language. I was meaning switching between main or, if you will, preferred langages.
I've heard a lot of people all over the place though, admittedly, mostly on the internet saying that C++ is used more widely in the gaming industry.[/quote]This is true. The problem beginners seem to have is that they then reach an undesirable conclusion: C++ is best language to use for games.

This is absolutely incorrect. What is widely used is not the same as what you need to use. What you need to use depends on your requirements. If it happens to be C++, then it's C++. If not, you need to pick appropriate tools.

I've also heard that beginners shouldn't start in C++[/quote]Also very true. Except in a few circumstances, beginners benefit from picking another easier language. C++ is a hard language, particularly so with the non beginner friendly informational resources.

why switch to C++[/quote]When you hit a requirement that C++ solves. Beginners do not encounter such a requirement.

how much programming experience should I have before starting in C plus plus[/quote]When programming is a language and technology agnostic task for you.
well first of all before i answer your two question i just would like to say that my answers are based on my personal opinion and experience with c++.

why switch to C++ ?


i think the reason why to switch to c++ is because it is a industry stander language where you can do pretty much any software you want from a simple calculator to a huge 3D software like 3D Max, Adobe Photoshop and 3D - 2D games.
Java is more of a language that deals with web applications and phone software like Nokia, Google Android, HTC ...etc


how much programming experience should I have before starting in C plus plus?


First I just want to emphasize more on my point earlier that what i'm going to tell you is in my personal opinion and experience. first of all i'm not the world greats programer, in fact i think i have a very long way to be any where as good as the other guy.

The first programing language that i learn was Basic, and all i did in it was just a simple "Hello World" program. after a very long research i found out that c++ was the way to go if i want to be a game programer. so i went to YouTube and searched for C++ tutorials and i started teaching myself. and to be honest i found the language very easy to understand, and i didnt understand why was every one telling me dont learn c++ as your first language.

after i finished watching the 20 tutorials videos on YouTube about c++ i want ahead and bought a c++ book and started to read. Yes at first some of the concepts in c++ was hard to understand at first but then when i read it for the second time everything became clear to me, and i was 17 year old at that time, now i'm 19.

so to answer your question, in my opinion if you put your mind to it you will understand everything. so no i dont think you need any programing experience to start learning c++ but in your case you already know java so that will make c++ easier for you to understand since java and c++ and C# are very a like.

once again this is just in my personal opinion.

Until now i'm studying c++ and trying to master it but that would be a long time like any other language out there.
if you want to get into game programing i suggest you to learn the basics of c++ and when you get a good grasp on the language start with SFML ( simple fast multimedia library ) which is a 2D graphic, sound, network library which is based on OpenGL for the 2D graphics.

here is a great great c++ tutorials on YouTube from a guy called The New Boston. check them out.



he also has lots of other tutorials like C#, PHP, Google Android dev, Java, Unreal Engine and many others.

good luck
Thanks for the replies. Based on what I've heard so far I think I'll get a book and get my feet wet with C++ for maybe a month or so and see how I like it. From there I can decide whether I want to continue in it or not (for the time being). If anybody else has anything to add I'd love to hear it.
Don't be seduced by the apparent "easiness" of C++ and how fast you can get sort-of-working code written, especially coming from syntactically related languages like Java. It may only take a few days (or even hours) to get a simple program done, and once you've gotten that far, it's painfully tempting to go "hey, I know C++ now, that wasn't so bad!"

I wince every time I read someone's personal story where they "learned" C++ in a matter of days/weeks/even months, and then go on to talk about how easy it is and how they don't understand why people warn against it.

This is why C++ is hard. I know people who have been using C++ for years who can't answer those quizzes. I know I can't guarantee that I'd get every question right on the first try, at least not just off the top of my head. And those quizzes just barely scratch the surface of the complexity and difficulty that C++ can present.


There is a vast gulf between "hello world" and a 3D game engine. You can write small, simple, perfectly legal C++ programs forever without running into an issue, and therefore feel justified in your belief that you "know" C++ and can avoid all the dangers of large-scale software development in the language. Then you write something that's actually large, and suddenly it crashes or leaks memory or does all manner of unspeakable evil and you can't tell why - because you never actually knew C++ to begin with.


I don't want to sound like the grouchy old guy who overhypes the dangers of crossing the street; if this sounds hyperbolic or exaggerated, consider carefully that it's not. I'm being deadly serious here. C++ is an immensely powerful tool, but like most powerful tools, it is very easy to use incorrectly. Worse, you can use it incorrectly for years and not know it, until finally you cross that invisible threshold of complexity and the whole thing blows up in your face.

It's kind of like people who accidentally shoot themselves in the head while cleaning their guns. You can look down the barrel of an empty gun and pull the trigger, and live; you might even get lucky enough to do that thousands of times. But if you don't understand that this is a bad idea, and that you're taking a serious risk by doing it, you will eventually splatter your brains all over the place.

The tragedy of beginners learning C++ is that most of them don't understand why they shouldn't look down the barrel to begin with. After all, it only ever goes "click" when you do that, right?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Bet this gets your goat then ApochPiQ... :)


41qZX-7MHnL._SS500_.jpg

Don't be seduced by the apparent "easiness" of C++ and how fast you can get sort-of-working code written, especially coming from syntactically related languages like Java. It may only take a few days (or even hours) to get a simple program done, and once you've gotten that far, it's painfully tempting to go "hey, I know C++ now, that wasn't so bad!"

I wince every time I read someone's personal story where they "learned" C++ in a matter of days/weeks/even months, and then go on to talk about how easy it is and how they don't understand why people warn against it.

This is why C++ is hard. I know people who have been using C++ for years who can't answer those quizzes. I know I can't guarantee that I'd get every question right on the first try, at least not just off the top of my head. And those quizzes just barely scratch the surface of the complexity and difficulty that C++ can present.


There is a vast gulf between "hello world" and a 3D game engine. You can write small, simple, perfectly legal C++ programs forever without running into an issue, and therefore feel justified in your belief that you "know" C++ and can avoid all the dangers of large-scale software development in the language. Then you write something that's actually large, and suddenly it crashes or leaks memory or does all manner of unspeakable evil and you can't tell why - because you never actually knew C++ to begin with.


I don't want to sound like the grouchy old guy who overhypes the dangers of crossing the street; if this sounds hyperbolic or exaggerated, consider carefully that it's not. I'm being deadly serious here. C++ is an immensely powerful tool, but like most powerful tools, it is very easy to use incorrectly. Worse, you can use it incorrectly for years and not know it, until finally you cross that invisible threshold of complexity and the whole thing blows up in your face.

It's kind of like people who accidentally shoot themselves in the head while cleaning their guns. You can look down the barrel of an empty gun and pull the trigger, and live; you might even get lucky enough to do that thousands of times. But if you don't understand that this is a bad idea, and that you're taking a serious risk by doing it, you will eventually splatter your brains all over the place.

The tragedy of beginners learning C++ is that most of them don't understand why they shouldn't look down the barrel to begin with. After all, it only ever goes "click" when you do that, right?


ok you kind of scared me a little :unsure:
so what do you suggest to do ? i think if you don't code and make mistakes and sometimes shot your self in the foot you will never learn.

This topic is closed to new replies.

Advertisement