Sign in to follow this  

simple games

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

hello. i was wondering if there are any books which do require some C++ knowledge but let you build simple 2D games and my own basic game engine? beginning game programming(teach yourself series) has been one that has caught my eye but could anyone else recommend any?

Share this post


Link to post
Share on other sites
There are very few that are actually good (beginning game programming is not one of these). I would recommend instead using the web as your resource for learning how to write games.

More importantly, how would you rate your skill in C++? If you would rate yourself as beginner, I would start with the first step -- applying C++ practically. If you think you've got a good enough grasp, than you can start with a basic 2D API like SDL. It has a Tutorials link (I personally liked the Cone3D Marius tutorials).

One of the biggest pitfalls for beginning game programmers is the urge to "jump in and get something working". This almost always results in failure. You need to take a back seat on the coding and start with designing. A great book for this is called "Code Complete" by Microsoft. Not all of it is relevant but the section on PDL and program design is quite thorough (this is revision 3 I'm talking about, I don't know about newer versions). Many of these game programming books fail to talk about the importance of program design and games, just as any application, are far more complex than they may at first appear and so require some sort of design. I'm not necessarily talking about a full-on design document outlining everything but you need to have a pretty good idea of where you're going to start and how you expect to end up.

Whenever I design a game I first think about what I call the 'object heirarchy'. This is part of my design phase in which I take a game concept and break it down into various smaller objects (these translate into C++ classes). I continue to break these objects down until I can't break it down any further (e.g., if I came up with a Renderer object I wouldn't break it into each drawing function).

From these objects you can get a pretty good understanding of the classes you need and how your game project will work. This isn't a simple 5 minute thing (not for a larger project anyway) and could take hours, even days to complete. Having a good notebook and pen handy is a good way to get ideas down and get things out on paper and sorted out before you sit down to start writing a single line of code.

Moving along, you're probably going to want to use an API that lets your game get used across many computer platforms and makes it very easy for you to work with. DirectX is not one of these -- use SDL instead (a lot easier, takes the headaches out of Win32 programming which is a nightmare and is cross-platform).

I have a feeling I'm about to start repeating myself so go ahead and start working with SDL and C++ together. My favorite tutorials: GFX with SDL

PM me if you need anything else. I check GD.Net every now and then. You can also get in touch with me over AIM (leeornet). I hesitate to post my e-mail address anywhere on the web so for now these are the ways to get in touch with me directly.

Good luck!

Share this post


Link to post
Share on other sites
What kind of c++ knowledge do you have?

In any case, I can only describe what I'm doing now -

I bought a c++ for dummies book, that introduced c++ in terminal

I looked at this website for programming with the SDL Library

http://www.aaroncox.net/tutorials/index.html

its a bit old but its been very useful. I've already been through the tutorials and I'm now off doing my own stuff.

Anyway, if you think you've got good concepts of c++, then jump straight ahead to that link.

Share this post


Link to post
Share on other sites

This topic is 3100 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.

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