• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ThatGuyOverThere

Are there good c++ programming books for beginners?

7 posts in this topic

I know the term "good" is subjective, so I figure I'll define it a bit: Good = clear, easy to read and understand with meticulous and detailed examples.

 

I've been wanting to learn to program in c++ for a while but I don't know where to start. I figured reading a few books and writing programs in c++ will help but I don't know what books are helpful to beginners of c++. I've had basic understanding of c, java, and c# from classes, but c++ isn't taught at my college.

 

If anyone was wondering, I do know about variables, functions, methods, object instantiation, loops (not so much as a game loop but I think I can pick up on it quick). Superclasses and subclasses still confuse me a bit but I'm hoping to work on it more over summer (in addition to my motion-capture internship). 

So are there any books that can teach me to program in C++ for video games?

0

Share this post


Link to post
Share on other sites

These are programming books are good to understand the concepts easily. Try coding the examples and make sense of what is said.

 

C++ for Dummies by Stephen Davis(covers basic first then advanced)

 

Thinking in C++ by Bruce Eckel. (It starts you off with Object Oriented C++)

 

C++ without Fear by Brian Overland(covers basic first then advanced)

 

You can read any books about data structures and analysis of algorithms in C++ once you got a good handle on the language. It is super useful for games and other programs and will broaden your horizons on what data structures can be built based on what you already learned and what you will need to know. How much time a function takes to execute and how much memory is used to execute that function is also good to know which is where analysis of algorithms skill is good to have.

 

In terms of C++ game programming, I heard C++ itself does not come with a built-in library so you will need to import the library you found online and import into the IDE you are using. 

 

Some libraries I found using a google search are SDL and Allegro. Try these libraries and see if you like it.

 

If you are still learning C++, you should make sure you have a well-rounded understanding of using C++ before attempting game development. Game programming requires a good understanding of the programming fundamentals and graphics programming. The idea applies to other programming languages like Java which I use for game programming which requires the knowledge I mentioned in the previous sentence.

 

I know procedural programming in C++ but very few of the object-oriented stuff. I'm more experienced in Java.

 

However, I can start you off with this example because everyone sees the hello world program when they first learn c++ or any language.

 

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}

 

Good luck.

Edited by warnexus
0

Share this post


Link to post
Share on other sites

Learning the basics of C++ in itself is a hard but very rewarding task. Get around to know the basic synthax of the language and be sure to get a good understanding of the following topics, as they are vital to C++ development, especially in terms of games:

  • Pointers - this is really, really important. In time you yourself will see why.
  • Memory allocation and memory release. This is a must as well.
  • Knowledge of how the algorithms in STL work. Templates can wait in the beginning though. They are a bit of an overkill concept for a beginner.

In terms of tutorials and books, I find these quite useful:

After you get down with the basics, you would need to do research on how you want to go on with the game development side of the language. You can go low level and pick up an OpenGL API and start reading tutorials on that, and from there doing your own thing. Or, you can go with something, that I honestly prefer, and choose an engine to work with. On the engine topic, you can look up Irrlicht or Ogre3D. Going with an engine is good in my mind because you can concentrate more (with C++ that's always just to some degree) on the building of the game, rather then building everything from the ground up. The last thing being an overkill for a beginner, in my mind.

Hope this helps.

 

Good luck.

0

Share this post


Link to post
Share on other sites

Well, I want to start learning more general video game programming such as movement, raycasting, input detection, collision detection, etc. I know I'll need to cover the basics so I'll start right away, thanks!

0

Share this post


Link to post
Share on other sites

Well, I want to start learning more general video game programming such as movement, raycasting, input detection, collision detection, etc. I know I'll need to cover the basics so I'll start right away, thanks!

You need to learn a lot of the basic stuff to perform movement on an object. It involves an understanding of logical, control flow statements, state of the object you are keeping track of, basic math and coordinates on a graphics window to name a few.

 

Input detection is pretty much getting input from the user. It can be listeners listening for mouse or key events generated by the user.

 

Collision detection at the most basic level is testing intersections of bounding shape of the object it is surrounding.

Edited by warnexus
0

Share this post


Link to post
Share on other sites

Well, I want to start learning more general video game programming such as movement, raycasting, input detection, collision detection, etc. I know I'll need to cover the basics so I'll start right away, thanks!

The thing with C++ is that it's a very very powerful and complex language.

Before you can do any of the things you talked about, you are going to need a really solid foundation.

Grasping the programming basics with C++ is one thing, actually developing usable code with it is a whole new thing all togather.

You should really take your time to understand concepts along the lines of memory management.

In languages like Java or C# for example, you have that taken care of for you by the garbage collector and other such useful features.

In C++ you just don't get that. You have to manage these things your self.

However, it's all worth it. Good knowledge of C++ can offer you the chance to learn really easy other programming languages, like Java, C#, Objective-C and so on.

0

Share this post


Link to post
Share on other sites

In C++ you just don't get that. You have to manage these things your self.

However, it's all worth it. Good knowledge of C++ can offer you the chance to learn really easy other programming languages, like Java, C#, Objective-C and so on.

 

Slight correction; I'd say: in C++ managing resources is easier, it's RAII most of the time, whether a resource is memory, file, image, network socket, or whatever:

http://www.artificialworlds.net/blog/2013/05/01/goodness-in-programming-languages-part-4-ownership-memory/

 

In some other languages, like the managed ones, you have to be careful to make a special distinction between distinct resource types and their interaction with exceptions, etc. -- e.g., GC only handles memory (so, a half-baked special case at most), for the other resources you have to remember about the Dispose and using patterns, etc.

 

Tricky!

 

It's a good thing C++ has a direct language feature for automatic, unified resource management :-)

 

"So the C++ destructor model is exactly the same as the Dispose and using patterns, except that it is far easier to use and a direct language feature and correct by default, instead of a coding pattern that is off by default and causing correctness or performance problems when it is forgotten."

http://blogs.msdn.com/b/hsutter/archive/2004/07/31/203137.aspx

Edited by Matt-D
0

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  
Followers 0