• Advertisement
Sign in to follow this  

Begin learning C++?

This topic is 4351 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
Fallen,

You are going to get a lot of differing opinions on what language to use. The bottom line is that any language you stick with and learn will be a good language to start with. The important part is the learning. Many people here started with c++ and turned out ok. Many people started with Python and learned c++ just fine. I personally started with c++ and didn't find it that hard to grasp basic concepts (mastery is different). It honestly depends on your learning style. If you would rather jump right in and start doing things right away, then pick a simpler language like Python (or even a game making tool like Game Maker). If you like to research and learn the nitty gritty stuff right away before you start tinkering, C++ might be fine for you. With C++ there is a certain level of logistical code that you have to create and understand for each program that isn't necessary in some languages. It's impossible to answer the question "Is this language good." The better question is "will this language be good for me" and only you can answer that.

If you decide to start with C++, pick up the book I suggested. It is a great beginning primer on C++ that introduces beginning-intermediate concepts using basic console games. It's nice because not only do you get to learn c++, you are also introduced slowly to how to use c++ to make a game.

Good luck, and the best advice I can give ever is: Always finish a project!

Share this post


Link to post
Share on other sites
Quote:
Original post by ChurchSkiz
Good luck, and the best advice I can give ever is: Always finish a project!


That's absolutely excellent advice. To that end, my advice is to always choose projects which you can finish in a reasonable amount of time. Otherwise something will almost certainly come up which will interrupt your progress. Then you'll have a half-finished project which you put a lot of work into, and maybe even learned a lot from, but will not be able to show to anybody.

Do not join the fools around here who want to make an MMO. Stick to small games and tech demos.

Share this post


Link to post
Share on other sites
Do we have any Software tool where we can practice developing game, or i just have to learn c++ and thats it! i can be a game developer?!

Share this post


Link to post
Share on other sites

Do not forget to read up on program design. I had problems with this a couple years ago when I started. I could tell you how to do anything in C++(or so i thought ; ), but I couldn't design a program! After reading some logic, program design, and problem analysis books, I can now(In my humble opinion) design a program and implement it in any language I know well enough. Believe me, this is a big one, and you'll thank me later(at least, I hope you will^_^).

P.S. In my Ultimately, Grand Supreme, Most Powerful, but HUMBLE Opinion, any language that supports SDL and OpenGL(and win32 and DirectX) will be fine.

Disclaimer: The contents of this post may offend some particularly stupid people. Deal with it.
(Don't take this seriously, OK?)

Share this post


Link to post
Share on other sites
Quote:
Original post by Ryuji23
Do we have any Software tool where we can practice developing game, or i just have to learn c++ and thats it! i can be a game developer?!


Look into Game Maker. There are a lot of game development programs where you don't have to have any programming language. I don't have any experience with them however.

Share this post


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

  • Advertisement