Jump to content
  • Advertisement
Sign in to follow this  
Fallen

Begin learning C++?

This topic is 4583 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First things first: I have almost no expirience with games coding. If I want to learn how to program games, is C++ the best way to go? I started trying to learn coding with Python (and was enjoying doing so), but the program kept freezing up. If C++ is the best language to learn, what do I need to learn it? Any good book/tutorial/program recommendations are helpful. Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
I recommend Beginning C++ Game Programming by Michael Dawson. Or as I like to call it "Learn C++ with some actual game related concepts." It's a great intro to C++ and game programming in general and I highly recommend it.

Share this post


Link to post
Share on other sites
Don't start by programming games as such. The first thing that you want to do is to get used to how the language works. Do this with little programs such as, what happens if I delete this amount of memory? How is it best to structure this class? and things of that nature. Once you have a basic grasp of the language, then go ahead and make 'Text Adventure 2007', hang man, pong etc...

You will find it much more rewarding trying to make games when you know how to use the tools and the language that you want to use.

Share this post


Link to post
Share on other sites
C++ is the industry standard for games, that doesn't make it the best way to learn though. Languages are only a means of control, it's the principles of programming that are important at this phase.

I'd suggest you stick with Python but use a different editor. I take when you said "but the program kept freezing up" that you meant the editor, not your own programs. I had a similar experiance since the editor they include is complete crap.

You may also want to check out PyGame.

Share this post


Link to post
Share on other sites
Dev-C++ is a great C++ IDE that includes the GCC comiler. It is easy to set things up with and doesn't take a long time to start a new project or file. You will want to work on some regular console apps BEFORE you even think about getting into graphics. Just mess around with your own source code or get some c++ source from program examples and modify it to see what happens. Good luck learning C++.

Share this post


Link to post
Share on other sites
Which language is best is purely opinion, so nobody can tell you which language is the best. Personally, I use C++ and love it.

As far as getting a good book...

If you're not familiar with coding in C++, then I recommend getting this book . If you know C++ and are now looking for game stuff, you'll need to look elsewhere.

Good Luck!

[Edited by - slowmike on March 29, 2006 11:25:20 AM]

Share this post


Link to post
Share on other sites
I second the suggestion of sticking with Python. Was the editor that froze up IDLE? I have never had problems with it. You could always play with python straight from the command prompt.

Share this post


Link to post
Share on other sites
Thanks for all the advice. I know it would be considered stupid to jump in at the deep end and try making the next X360 smash hit - I do want to focus on getting to grips with a language and was wondering if C++ is the best to try and get to grips with. And yes, it was the Python IDLE shell that froze up, and I have a suspicion it was something to do with Norton.

I've just downloaded Windows Visual C++ Express - is that any good to work with?

Thanks again.

Share this post


Link to post
Share on other sites
Quote:
Original post by ChurchSkiz
I recommend Beginning C++ Game Programming by Michael Dawson. Or as I like to call it "Learn C++ with some actual game related concepts." It's a great intro to C++ and game programming in general and I highly recommend it.
Hmm I believe I was looking into this book. It is like 738 or some odd pages is it not? It sounds really good. I would suggest getting the C++ for dummy's I myself have it on my computer and it is actually really good and explains quite well. It really depends on how much you want to learn. If you want a book that can teach you everything from variables to creating a whole application program like a grocey store. I have the perfect book for you. It is about 1036 pages and is called Learning to Program in C++ by Steve Heller. This book even explains the computer part, such as which is executed first in the compiler and all that, it teaches Hex, Binary, and what each part of the computer is for to help you understand programming even more.

Share this post


Link to post
Share on other sites
C++ is definately not an easy language to learn. "The C++ Programming Language" (really the only book you should need to read about the base language) is about 1,000 pages long, definately not a quick read. Some of the more modern compiled languages (C#, Java, D, etc) are easier, but C++ is nearly ubiquitous and the most portable out of the compiled OO languages (not counting Java, because, well, the runtime environment kind of sucks).

But who said you need to go with C++, or even a compiled language? If you were using Python and enjoying it, why not stick with it? Switching languages, APIs, and throwing away all your work because you've encountered a problem you don't understand is pretty foolish. Python is a pretty good language, definately easier to work with than C++ in many respects. Ruby is even better (makes Python look like a nasty hack), but it lacks in performance and bindings to game libraries (just had to plug Ruby, it's my favorite :P).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!