Sign in to follow this  

Book suggestions for C++ 2D Game Programming

Recommended Posts

Hello,

I'm new to programming and game development. I just started with the book Beginning C++ Game Programming and was wondering what books I should buy to create and program 2D games in C++. I was thinking of buying the book Beginning OpenGL Game Programming after I have finnished the current book. Any other book suggestions on this topic would be appreciated.

 

 

Share this post


Link to post
Share on other sites

Hey! I've read tons of books on OpenGL, and one for 2D games, and lots of math books.

Honestly though, if you want my HONEST opinion, ditch the OpenGL book idea. Most of them will be 3D, not 2D. Which based on what you've said, you do not want.

Books I recommend that are good:

(crash course on vector math for 2 games): https://www.cse.unr.edu/~moberberger/2dvector.pdf

(SFML game development): https://www.packtpub.com/game-development/sfml-game-development

 

Good luck on your journey!! :)

Share this post


Link to post
Share on other sites
Posted (edited)

Several game programming books are actually graphics books, and they are often focused on 3D instead of 2D. This is because the young market wants 3D because it's modern. Personally, my bias is beginners just need to know how to make Pong, not a 3D race car game or a MMORPG. Simple 2D games teach a lot! And it's manageable. There's only a handful that is focused on 2D for beginners. These are what I recommend for 2d game programming:

Tricks of the Windows Game Programming Gurus, 2nd edition, by Andre' LaMothe. 

- Covers Windows programming (still very relevant), DirectX (this is largely outdated, but it's one of the few graphics books focused on 2D, and you can apply it to newer APIs -- see the book below. I converted his graphics code into OpenGL in the past, for example. In addition, there's AI, physics (in 2D!), sprite animation, etc. The author's writing style and personality is different and not liked by some, and writes in a C style in C++ to keep it easy for the reader to follow along, but after knowing him for several years, he's one of the most brilliant game programming authors out there. These days, he develops and teaches hobbyists of making video game consoles (XGameStation, etc.), embedded systems and robotics which is way beyond me  (http://www.ic0nstrux.com/). Many popular developers started because of his books (Call of Duty, etc.). 

Data Structures for Game Programmers by GameDev's Ron Penton, Series Editor: Andre' LaMothe.

- Covers data structures you'll need in 2D and beyond (and it's more than what the STL library provides), 2D graphics with SDL, common algorithms, etc. All written in C++ classes. Optimizing it depends on your skills, but you would most likely use the STL after learning how the data structures work underneath and learning how to appropriately apply them.

Really, those two big book tomes are what you need. You'll be far ahead than anything else in the book market. 

Hope that helps!

Edited by redshock

Share this post


Link to post
Share on other sites
Posted (edited)

Hey! I've read tons of books on OpenGL, and one for 2D games, and lots of math books.

Honestly though, if you want my HONEST opinion, ditch the OpenGL book idea. Most of them will be 3D, not 2D. Which based on what you've said, you do not want.

Books I recommend that are good:

(crash course on vector math for 2 games): https://www.cse.unr.edu/~moberberger/2dvector.pdf

(SFML game development): https://www.packtpub.com/game-development/sfml-game-development

 

Good luck on your journey!! :)

Thanks guys for your posts.

I am thinking of buying the book SFML game development. Is the book I am currently reading enough or should I buy additional books before starting with SFML?

Edited by JordiL90

Share this post


Link to post
Share on other sites

SFML is my favorite library, though they've been slow with updating it for Visual Studio 2017, if that's your editor. Their last binaries were made for Visual Studio 2015, so I don't know why they've been slow lately. Prior to beginning, having a good understanding of C++ is probably the most important before starting with SFML, which is entirely built around classes. 

Share this post


Link to post
Share on other sites

SFML is my favorite library, though they've been slow with updating it for Visual Studio 2017, if that's your editor. Their last binaries were made for Visual Studio 2015, so I don't know why they've been slow lately. Prior to beginning, having a good understanding of C++ is probably the most important before starting with SFML, which is entirely built around classes. 

 

I currently use dev-C++ but will use code::Blocks for SFML. What book on C++ should I buy after finishing Beginning C++ game programming? I want to learn enough C++ so I can start with SFML.

Share this post


Link to post
Share on other sites
Posted (edited)

I started off with Absolute Beginners Guide to C Programming, 2nd edition, which is the base document of C++, and then I got the rest of my answers of C and C++ with C++: The Complete Reference, 4th edition. While the C++ book is outdated with the current versions of C++ (C++ 11, 14, 17), and if you plan to use C++ later for future jobs, you might be called to work on earlier versions of C++ for maintenance of old applications, so it wouldn't be a bad idea to know the base â€‹of C++ before the latest and greatest features. For example, at work we used different versions of .NET. Newer projects would use the latest .NET version. The older ones had to be maintained. It was beneficial knowing where one version of .NET ends and other begins, which makes you a well-informed .NET developer. Same goes with knowing where C ends and C++ begins, where C++ 11 ends and C++ 14 begins, etc. These books will give you a sequential and organized understanding of C++. 

Edited by redshock

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this