Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to make nice games with good architecture that are easy to support and extend. But when i write code it all gets messy and hardcoded, so when I want to add a feature it becomes a huge pain. Is there any book that teaches me how to design my game upfront, so I will know what classes I will want, how to do certain features etc.

share|improve this question

closed as off-topic by Byte56 Feb 15 '15 at 2:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

Well, googling for "game architecture design" drops out a lot of books on a subject. – Petr Abdulin Jul 31 '12 at 10:58
Well, Dave Eberly's books are quite good. As well as searching for similar questions posted here and on stackoverflow. – teodron Jul 31 '12 at 11:11
Everything becoming "hardcoded" isn't necessarily a bad sign -- you may just be following YAGNI/KISS. Adding new features can mean having to refactor your code. That being said, it's always a good idea to plan and design the game first, so that you don't have to rewrite too much. – darthfett Jul 31 '12 at 15:31
up vote 5 down vote accepted

I would recommend Game Coding Complete.

It has a large focus on the design of each part of the game, and how they work together. Most books that deal with programming games try to dumb everything down into small demos that break or become messy when you try to extend them. Instead, this book spends the time to break each part up into extendable pieces of a framework.

It's authors have experience working on large projects with many people, and the book reflects that.

I know exactly what you mean when you say " it all gets messy and hardcoded, so when I want to add a feature it becomes a huge pain." Reading this book really helped me solve this problem.

I believe that the book recently released it's fourth edition. Here is the amazon link

To see what I mean you can use Amazon's preview to read the first part of Chapter 2 "What's in a Game?" This chapter describe the architecture that the rest of the book implements.

share|improve this answer

It seems like what you're looking for is a more informed outlook on software architecture and software design in general, which are more along the lines of software engineering topics than game development topics. My suggestion is to dig through the architectures of several other existing games, and see how they are structured; in addition, pick up a copy of Head-First Design Patterns, and that might help. The above comment about Dave Eberly's Game Engine Design book is also spot-on.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.