Jump to content
  • Advertisement
Sign in to follow this  
hellmel36

C++, Now What?

This topic is 3826 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

I have just finished reading Beginning C++ Through Game Programming and feel confident in my C++ knowledge, but don't know where to turn to start putting the language to any real use. Any recommendations for books out there that will help me make the transition to at least programming some more visual games? If it helps, I'm programming for Windows at the moment. One book I looked into was Sams Teach Yourself Game Programming in 24 Hours... The book doesn't do too well helping me understand what is going on with it calls the Win32 API. Even the very first program example has me overwhelemed. Since I'm using Windows, are there any books you recommend that can teach me the API while focusing on games? Sorry if the post seems a bit "here and there", but after finishing the first book, I am just really excited about the possibilities.

Share this post


Link to post
Share on other sites
Advertisement
Programming Windows by Charles Petzold. Then, buy an introductory book to DirectX programming or read the documentation and microsoft tutorials if you're comfortable with it. That's how I transitioned from just knowing C++ to making games and other useful things.

Share this post


Link to post
Share on other sites
Well first things first, calm down in the possibilities; you're a long way off.

That said, work on some console apps to just make sure you have your C++ down. Practice helps fill in little gaps. Guess the random number, Hangman, something that reads/writes files, maybe a text based combat sim or map generator (the C# program at the bottom of the forums has an example exercise for that).


After that, the C++ Standard Library by Josuttis is the next book in the queue (arguably before the console apps) and then Design Patterns by Gamma et al. Program design is required for anything more than the most trivial applications.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
Well first things first, calm down in the possibilities; you're a long way off.

That said, work on some console apps to just make sure you have your C++ down. Practice helps fill in little gaps. Guess the random number, Hangman, something that reads/writes files, maybe a text based combat sim or map generator (the C# program at the bottom of the forums has an example exercise for that).


After that, the C++ Standard Library by Josuttis is the next book in the queue (arguably before the console apps) and then Design Patterns by Gamma et al. Program design is required for anything more than the most trivial applications.


Great advice, so quoted for truth. However, that is too ideal and most likely too boring to hold your interest for long. I know it would be for me. Sure you might be better off for it, but if you lose all interest it won't matter anyway :). Instead, do that alongside poking around with SDL. It appears you are working on Windows, and SDL works great on Windows. It is considerably quicker to do things in SDL than to do the same things with Win32. I don't know of any books, but this site has great tutorials. Honestly, if those overwhelm you too badly, you probably should just focus on the C++ language itself. SDL is great, however, as an introduction to API's.

(I really should just make some sort of web page to link to. I write a recommendation for SDL almost every day. And Lazy Foo should be sending me checks for advertising. Oh well, I guess his tutorials are the reward...)

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
Well first things first, calm down in the possibilities; you're a long way off.

That said, work on some console apps to just make sure you have your C++ down. Practice helps fill in little gaps. Guess the random number, Hangman, something that reads/writes files, maybe a text based combat sim or map generator (the C# program at the bottom of the forums has an example exercise for that).


After that, the C++ Standard Library by Josuttis is the next book in the queue (arguably before the console apps) and then Design Patterns by Gamma et al. Program design is required for anything more than the most trivial applications.

Actually I read the Dawson book he mentioned a while back and it comes with the obligatory guess the number and hangman games:)
But I agree you will need more practice tackling more advanced books.
You don't need to learn the Win32 API to make simple 2D games and actually that Mike Morrison book is one of the worst books for game programming ever!
I mean he spends pages and pages making games that aren't even fullscreen that stuff that can be done with one line of code in Allegro or SDL takes him page after page!
If you want to make graphical stuff right away the easiest and best book I know of for a beginner is "Game Programming All in One".

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
Quote:
Original post by Telastyn
Well first things first, calm down in the possibilities; you're a long way off.

That said, work on some console apps to just make sure you have your C++ down. Practice helps fill in little gaps. Guess the random number, Hangman, something that reads/writes files, maybe a text based combat sim or map generator (the C# program at the bottom of the forums has an example exercise for that).


After that, the C++ Standard Library by Josuttis is the next book in the queue (arguably before the console apps) and then Design Patterns by Gamma et al. Program design is required for anything more than the most trivial applications.

Actually I read the Dawson book he mentioned a while back and it comes with the obligatory guess the number and hangman games:)
But I agree you will need more practice tackling more advanced books.
You don't need to learn the Win32 API to make simple 2D games and actually that Mike Morrison book is one of the worst books for game programming ever!
I mean he spends pages and pages making games that aren't even fullscreen that stuff that can be done with one line of code in Allegro or SDL takes him page after page!
If you want to make graphical stuff right away the easiest and best book I know of for a beginner is "Game Programming All in One".


Does this book (bolded above) use C or C++? I'm just worried that if it is in C, I may start getting concepts and syntax confused since C and C++ are similar and I'm not that experienced with C++ alone yet.

Share this post


Link to post
Share on other sites
Quote:
Original post by hellmel36
Quote:
Original post by daviangel
Quote:
Original post by Telastyn
Well first things first, calm down in the possibilities; you're a long way off.

That said, work on some console apps to just make sure you have your C++ down. Practice helps fill in little gaps. Guess the random number, Hangman, something that reads/writes files, maybe a text based combat sim or map generator (the C# program at the bottom of the forums has an example exercise for that).


After that, the C++ Standard Library by Josuttis is the next book in the queue (arguably before the console apps) and then Design Patterns by Gamma et al. Program design is required for anything more than the most trivial applications.

Actually I read the Dawson book he mentioned a while back and it comes with the obligatory guess the number and hangman games:)
But I agree you will need more practice tackling more advanced books.
You don't need to learn the Win32 API to make simple 2D games and actually that Mike Morrison book is one of the worst books for game programming ever!
I mean he spends pages and pages making games that aren't even fullscreen that stuff that can be done with one line of code in Allegro or SDL takes him page after page!
If you want to make graphical stuff right away the easiest and best book I know of for a beginner is "Game Programming All in One".


Does this book (bolded above) use C or C++? I'm just worried that if it is in C, I may start getting concepts and syntax confused since C and C++ are similar and I'm not that experienced with C++ alone yet.

Yeah I know until I read a good C book and taking some C++ college classes I couldn't tell the difference between C and C++ myself.
That's probably why Telastyn recommends that you stick with just plain C++ for now so that when you do start using an API that is not part of C++ you'll know the difference.
In reality though you will find few game programming books that stick with pure C++ like "accelerated c++" or other academic books and use a bastardized mix of C/C++. So to answer your question the book uses C mainly in conjunction with Allegro although there is nothing stopping you from using C++ with Allegro.

Share this post


Link to post
Share on other sites
Meh, C++ (and definitely C) are not languages that fast track you into game development. If you get frustrated by the pace of learning, the first step is dump C++ and move to another language. C# is a solid choice, because of XNA. Python’s a great choice too. Java should be as well. Here’s the deal with C++, you have to take your time learning it, and how it is generally used (i.e. you need to know a good bit of C as well). Don’t like crossing the ts and dotting the Is? Pick another language.

Once you do that, you learn various libraries you might need in programming a game. If you’ve never programmed a game before, you might need to extensively Google and ask on forums for guidance on where to look. Overall, you spend a lot of time with the learning curve in C++.

Hellmel, if you’re still set on the C++ path (which I don’t recommend for a beginner), let us know, and we can guide you there. Otherwise, look at other forum posts and Google for the general consensus on how beginners should choose a programming language. I already suggested two widely recommended languages here.

Share this post


Link to post
Share on other sites
Well, I am learning C++ fresh and new, but am a lot more familiar with Java. How does Java compare to C++ for game development?

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!