Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
    
Well, googling for "game architecture design" drops out a lot of books on a subject. –  Petr Abdulin Jul 31 '12 at 10:58
1  
Well, Dave Eberly's books are quite good. As well as searching for similar questions posted here and on stackoverflow. amazon.com/Game-Engine-Design-Second-Edition/dp/0122290631 –  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
add comment

2 Answers

up vote 4 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 http://www.amazon.com/Game-Coding-Complete-Fourth-Edition/dp/1133776574/ref=dp_ob_title_bk.

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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