How do YOU structure your game engine(s)?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

How do YOU structure your game engine(s)?

Post 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.
Last edited by like80ninjas on Mon Jul 04, 2011 4:53 pm, edited 2 times in total.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

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

Post 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. ;)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

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

Post 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.
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

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

Post 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. :)
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

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

Post 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?
XianForce
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 767
Joined: Wed Oct 29, 2008 8:36 pm

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

Post 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.
User avatar
bnpph
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 75
Joined: Thu Mar 10, 2011 12:30 pm

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

Post 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.
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

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

Post 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.
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

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

Post 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.
Last edited by short on Mon Jul 04, 2011 4:46 pm, edited 1 time in total.
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
User avatar
rolland
Chaos Rift Regular
Chaos Rift Regular
Posts: 127
Joined: Fri Dec 21, 2007 2:27 pm
Current Project: Starting an Android app soon
Favorite Gaming Platforms: PS1, N64
Programming Language of Choice: C++
Location: Michigan, US

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

Post 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.
I'll write a signature once I get some creativity and inspiration...
like80ninjas
Chaos Rift Regular
Chaos Rift Regular
Posts: 101
Joined: Thu Dec 09, 2010 2:13 am

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

Post 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.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

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

Post 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. ;)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
Posts: 303
Joined: Sun Nov 21, 2010 10:56 am
Current Project: Engine
Favorite Gaming Platforms: N64
Programming Language of Choice: C++, PHP
Location: Norway

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

Post 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?
User avatar
xx6heartless6xx
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 80
Joined: Wed Feb 02, 2011 9:42 pm

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

Post 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!
User avatar
TheBuzzSaw
Chaos Rift Junior
Chaos Rift Junior
Posts: 310
Joined: Wed Dec 02, 2009 3:55 pm
Current Project: Paroxysm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

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

Post by TheBuzzSaw »

The new site and AiGD 18 are vaporware.

OOOOH I went there...
Post Reply