Tell me more ×
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 designing a level editor for game, and I'm trying to create sort of an 'event' system so I can chain together things. If anyone has used RPG Maker, I'm trying to do similar to their system. Right now, I have an 'EventTemplate' class and a bunch of sub-classed 'EventNodes' which basically just contain properties of their data. Orginally, the IAction and IExecute interface performed logic but it was moved into a DLL to share between the two projects.

Question: How can I abstract logic from data in this case? Is my model wrong? Isn't cast typing expensive to parse these actions all the time? Should I write a 'Processor' class to execute these all? But then these actions that can do all sorts of things need to interact with all sorts of sub-systems.

I'd like to add this is running on a server - so performance if important... hence the casting question. I considered converting all events into a 'scripting equivalent' and executing this using a script parser since I know that is a common way of doing this..

share|improve this question
To make what I wanted to avoid clear: en.wikipedia.org/wiki/Command_pattern#C.23 I have something exactly like that - sans the Execute method. The logic shouldn't be in the DLL - it should be in the Server. I really don't want to double sub-class. – Vaughan Hilts Jun 29 '12 at 5:04
1  
Casting shouldn't be a performance problem, unless you want to do it to tens of millions of objects every second. I really don't understand what's the problem with having the logic in a DLL. What do you mean "it should be in the Server"? Please clarify. – Marton Jun 29 '12 at 6:59
The DLL is shared between editor and server. The DLL is the data representation. It knows nothing about server logic. – Vaughan Hilts Jun 29 '12 at 11:30
1  
This question is really difficult to understand, please make this a bit more clear. – dylanisawesome1 Dec 17 '12 at 16:03

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.