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'm looking in to developing a game editor - essentially a level editor for my game but a little more advanced i.e edit menus and loading screens and what not.

So far, I have come up with a data-driven model as the basis for this, with information possibly being stored in a binary format/xml. I could then have the actual game load up scenes based on this information (main menu, level select, loading, level1 etc).

My main problem at the moment is how to handle my game logic. How can I link together level/scene logic that I'll want to add - for instance if I want the user to answer a question - with all the data I've got stored for the scene (background/terrain sprites, enemies etc)?

My game code will currently consist of classes for a scene, npc, other objects etc + the loading code for loading scenes, but not too much else.

To summarise, given the described architecture of my game, how can I appropriately handle my game logic?

share|improve this question
2  
Look at some other game editors, and pick and choose what you like. I personally like Unity's model, where you attach behavior components to scene objects, and then link them together via the object's Inspector menu. –  tyjkenn Mar 17 '13 at 2:14
    
Agreed the trend in the industry right now is components with specific behavior being attached to entities or objects within the scene. These components can also potentially signal changes in behavior of other components on the entity. For example if you had a damage component on a character when they receive damage this component might handle it in response to a damage event and consequently this component might examine armor component etc on the character and determine a health reduction value on the inflected damage t –  Peter_b_sw Dec 31 '13 at 20:33
    
This is really, really broad. Can you narrow the question down at all? –  Josh Petrie Dec 31 '13 at 21:49
add comment

closed as too broad by Josh Petrie Dec 31 '13 at 21:48

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.