Jump to content
  • Advertisement
Sign in to follow this  

Game Engine Design

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

I've asked similar questions before, but I'm looking for some help and resources on Game Design. I'm currently using UML to help structure my classes and I'm trying to figure out how everything will work before I start programming. I don't normally do this, and I think that is why most of my projects fail. I want to get a good design down this time before I even start touching code, but... Design is Hard! I haven't quite figured out HOW to detail out a program using UML... I'm looking for some guides, hints, or tutorials on the actual design process for structuring a game engine using OOP. I want to see recomendations on classes and logic flow. I want to see details on how to make all these classes work together. A section on common pitfalls and problems would be great as well. Heck, just a sample UML diagram of a few simple game engines would be great. Does anyone have advice to offer or links to good sites dealing with designing a game engine using C++? Something containing any or all of the above would be wonderful. Thanks if you can help.

Share this post

Link to post
Share on other sites
You know, i really think experience is the best teacher for this subject. I mean, some problems are not problems until you already have 50 files down. We could explain it to you but you wouldn't understand until you hit the same problem yourself. just IMHO.

But to start, i think the heart and soul of the "engine" is your object processor. That's the core part of the system that does Update() and Draw() and that sort of thing. Some people iterate over a list, others are using a scenegraph, etc. Once you've got a precessor of some kind, then you can get on with the rest.

After that, you'll want to block out your major subsystems:

- Sound FX
- Music
- Graphics and Drawing
- Resource Management (if wanted)
- Collision Detection (start early or pay for it later)
- Movement and Physics (time based or frame based?)
- World Creation
- Input and Response
- Networking (if needed. Another painful subject)
- UI
- State Management (Title screen, action, submenu, etc)

Don't be afraid to take them apart and recreate them many times to get it right. I'm on my 3rd or 4th collision system, 3rd version of my object processor (might change again), 3rd version of my graphics system, and so on.

If you haven't already, grab a book called "Design Patterns". It's not for games, but it works good for engine ideas.

Sorry, i can't be much more help than that.

Share this post

Link to post
Share on other sites

Thanks, your suggestions do help a little. I've started by graphing out my Object processor and other classes that I need, and I've worked out which of those classes need to know about which other classes in order to function. I'm now staring at this sheet of paper that is obviously incomplete and I'm finding myself not sure where to go from here. I want to get furthur in my design than this before I start coding, but I don't really know where to go from here.

I guess I need to start detailing out each class/object with it's functions and figure out how I'm going to implement stuff like map loading, collision detection, game state saving and loading, etc. This is the hard part for me though. I don't really know 'how' to structure some of these things, so I guess I'm just going to have to give it a try and hope it works.

I'll check out the Design Patterns book you suggested and see if it helps as well.

Also, if it helps, My engine is going to be a 2D tile-based engine that doesn't need network support.

If anyone has more suggestions or can explain to me the basic design of their engine, I would be very appreciative.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!