Page 1 of 2

How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 12:20 am
by like80ninjas
I'd like to start a discussion about how each of us choose to structure our game engines. What sort of systems/managers do you use? How do you go about updating your games objects? How do you prefer to structure sections of your engine?

I personally have been using an Engine class and letting that do most of the API stuff, and then using various managers like a PlayerManager, ResourceManager, and EnemyManager for taking care of the rest. Also, I store my game objects "Entities" in a vector, and iterate through them for collision and rendering purposes.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 9:07 am
by dandymcgee
like80ninjas wrote: This has worked very well for me so far, but i'm interested in hearing how everyone else does there systems so I can update mind with a broader spectrum of ideas.
I say if it it works, stick with it. If you come across a fundamental flaw at some point that prevents you from moving forward, then considering reworking it. Until then, focus on creating something cool with your existing framework. In turn, you'll learn the limitations of your design and have a better understanding of how to improve it for your next project.

I spent far too much of my spare time (when I still had it) searching endlessly for the perfect answer to game engine design. As a result, I never did finish anything that I would've liked to have seen to the end.

The earlier you learn that no code is perfect, the more successful you will be. Terraria is the latest paragon of this idea. Successful? Yes. Good coding habits? No. ;)

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 10:33 am
by mattheweston
dandymcgee is right. I know of a game that was written in spaghetti code and thirteen years later is still being enjoyed by several people today. It had huge communities in it's day, but it still has quite a following. This was a commercial title too.

Just keep in mind that game development is an iterative process. You start with what you think is a great design and then refine it over and over. Eventually, you will have a polished product that you feel worthy of releasing.

The focus for beginning and novice game developers should be to just finish first then go back and tweak later. As you get more experience you will know instantly what needs to be included in your engines and what doesn't.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 12:56 pm
by Falco Girgis
I would respond, because I like topics like this, but we have like a 10 page long section of our new site dedicated to this, so I'll have to sit this one out. :)

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 1:38 pm
by like80ninjas
To the first two posters, thanks for the advice, but this was mainly for discussion.
I'd still like to hear how YOU do things, not how you'd prefer me to stick to my own methods.

Also, I didn't actually mean update my engine with your ideas, I just meant update my brain catalog with different ideas that I could adapt as I saw fit.


As for Falco, I would LOVE to hear your methods of doing this, but new site? I haven't heard anything about it. Is it currently active?

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 2:04 pm
by XianForce
GyroVorbis wrote:I would respond, because I like topics like this, but we have like a 10 page long section of our new site dedicated to this, so I'll have to sit this one out. :)
:o. I think you may be giving fans too much at once. I just hope my brain doesn't explode on the release of Chapter 18 AND the new site :o.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 2:42 pm
by bnpph
Keep sound/graphics/game-objects as separate components.
Decide what you need and stick to it. You don't need a fully-featured game engine for a tiny platformer.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 3:24 pm
by like80ninjas
Again, this post was for discussion, I'm not looking for help with a game engine, nor advice. Most of you seem to be missing the point of this topic.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 3:33 pm
by short
It could be the lack of clarity in the first post. I for one am confused if what they have replied with is not what you are not looking for.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 4:38 pm
by rolland
short wrote:It could be the lack of clarity in the first post. I for one am confused if what they have replied with is not what you are not looking for. :
I think I see what's up. He's asking for ideas on how to structure a game engine by asking how we structure ours. And everyone's telling him to just go with what he has until it doesn't work for what he wants to build. He's looking for some theory on the subject -- some new ideas that might work better than some of what he's using now. I'd give my thoughts on the topic, but I've been on a coding hiatus for quite a while now.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 4:53 pm
by like80ninjas
Edited the first post to make it as clear as possible, now maybe we can get on topic!

Also Rolland, I'm not looking for ideas really, just to start a discussion and see how other people structure their games.

Re: How do YOU structure your game engine(s)?

Posted: Mon Jul 04, 2011 5:09 pm
by dandymcgee
like80ninjas wrote:Edited the first post to make it as clear as possible, now maybe we can get on topic!
Those are significantly better questions. ;)

Re: How do YOU structure your game engine(s)?

Posted: Mon Aug 15, 2011 5:25 pm
by superLED
I am not proud of how I structure things. I have to change a lot soon, because I have too much stuff going on in the same place.

This is the main classes I have in all of my projects:
- System,
- Input,
- Music,
- Timer,
- Graph (inherited: animation and text)

I have an instance of all the objects in the System class, and control everything in there. As well as the players and every images.
This is kinda hard to work with, because there's just too much inside the System class. Hard to have control of everything.

I am not sure how I am going to fix this mess, but maybe I should make an "ItemBank" class which stores every items, and the same with players, enemies etc.

It works for small projects, but now when I am moving into bigger stuff, I need to reconstruct my engine to have a fluent workflow.

Anyone got any ideas on how I should handle these problems?

Re: How do YOU structure your game engine(s)?

Posted: Mon Aug 15, 2011 5:47 pm
by xx6heartless6xx
GyroVorbis wrote:I would respond, because I like topics like this, but we have like a 10 page long section of our new site dedicated to this, so I'll have to sit this one out. :)
This would be REALLY helpful for me. Cant wait!

Re: How do YOU structure your game engine(s)?

Posted: Mon Aug 15, 2011 8:41 pm
by TheBuzzSaw
The new site and AiGD 18 are vaporware.

OOOOH I went there...