views:

736

answers:

5

I've tried to develop a 2D game with C++ in the past using mere objects, however, in the design process I don't know how and what parts of the engine I should split into smaller objects, what exactly they should do and how to make them interact with each other properly. I'm looking for books, tutorials, papers, anything that explains the game engine design in detail. Thanks.

+5  A: 

give this a try: http://www.devmaster.net/articles/oo-game-design/

jspcal
devmaster FTW!!
sims
A: 

Eberly's 3D Game Engine Architecture and 3D Game Engine Design are rather heavy on the theory, but cover all of the bases quite well.

greyfade
+6  A: 

Mandatory reading: http://scientificninja.com/advice/write-games-not-engines

Why do you think you need a game engine? Write the code you need in order to implement your game. Modify it along the way as requirements change. And when you have a complete game, take a step back and look at what the result looks like.

You can't, and shouldn't, lay out a complete class diagram at the start. Sketch out a rough idea of what general components you want, and what their responsibilities should be, and then try to code it. Start out with the classes you're sure of. Sooner or later, some of them will get big and unwieldy, so you split it into multiple smaller ones. Sometimes, you may find that several classes are basically doing the same thing, so you merge them back together. Hopefully, sooner or later, you'll end up with a design that works, which is more than you'd get if you tried to design a game engine up front.

jalf
theactiveactor
Even with experience, it's still 1) impossible, and 2) a bad idea to try to come up with a complete detailed design *before* implementing it. There's a reason the whole "agile" thing has caught on so much. You *will* encounter issues you hadn't thought of, so make the design decisions when you've got the information you need -- that is, when you've tried to implement it, and found out what all the pitfalls are.
jalf
+1  A: 

If you haven't made a game before, how can you make an engine? There's tons of free engines out there or you will be spending 20 years trying to get something done because you will be rewriting over and over again.

Charles Eli Cheese
Yep, what makes a game good is the content not the engine, all good programmers 'borrow' other peoples code whenever they can
Patrick
A: 

http://fivedots.coe.psu.ac.th/~ad/jg/

This guy lays out a good oop style and through the book helps you build an engine frame. It's spot on good stuff.

Nathan