Data-Driven entities

Published December 06, 2006
Advertisement
Ok I want to write another article, this time on Data-Driven entities.

The article would be based on something that I use often these days, and effectively would bring together a couple of years of my working and experimenting with these types of systems.

Here's the proposed format:

1) Extensible attributes-- Type-less value system-- Entity attribute set2) Method Calls-- Create a generic methodcall interface-- Attach methods to entities3) 'Class' Prototypes-- Duplication of entities4) Event handlers-- Create an event/messaging system-- Make entities event-aware, using MethodCall interface when event is fired5) Value Adapters-- Create abstract adapter interface for Values/Value data for use in scripting/serialisation6) ScriptInterface-- Create a generic script interface to expose entities, methods, and events to a script environment-- MethodCall adapter should allow for scripted methods to be called-- Attribute adapter allows attributes to be get/set from scripts7) GameMonkey Script Interface Implementation-- Create an implementation of the ScriptInterface in GameMonkey Script-- Create some example scripts8) Serialisation Layer-- Create basic serialisation layer to allow entities to be fully/partially serialised in/out-- Create XML serialiser


One thing I'm unsure of whether to include is the use of an integral State system for the entities - the state is basically an abstraction of the attribute sets, so an entitiy in a different state effectively 'switches' attributes/methods from another state. There is the option to fall-through, so one state can contain only 'new' attributes, with any subsequent calls dropping through to the default state if an attribute doesn't exist.

Two other things I've not mentioned here is the ability to 'mix-in' Entities - effectively a sort of inheritance system; also the use of components to build entities. Component-based entities would be mainly C++-side, so you'd create a component that plays sounds or renders the entity in a certain way.

Who would be interested in this article? Are any of the things I'd be missing off vital to the use of the system?

Note that this is related, but separate the the GameDB system I'm currently building, but shares many concepts.
Previous Entry house
Next Entry One day fast
0 likes 5 comments

Comments

Gaheris
I would be interested since I've been thinking about implementing something similar one of these days.
December 06, 2006 08:11 AM
jollyjeffers
I'd read this article. Not sure I've got any practical use for it in my current projects, but it sounds interesting nonetheless. I've mostly been reading your scripting/data-driven articles/journals with reference for future projects...

Quote:I'm unsure of whether to include is the use of an integral State system for the entities
Sounds interesting. Include it!

Both your 'integral state system' and 'component-based entities' sound very similar to a design model I've studied before. I really can't remember when, where or what it was called - but theres definitely something behind it. Did you base it on some research?

Jack
December 06, 2006 08:51 AM
evolutional
Quote:Original post by jollyjeffers
Both your 'integral state system' and 'component-based entities' sound very similar to a design model I've studied before. I really can't remember when, where or what it was called - but theres definitely something behind it. Did you base it on some research?


Yes, all of my stuff is based on research and existing systems. I've combined the ideas and theories of many separate studies and made a single unified system. Part of the article will be the bibliography, of course ;)
December 06, 2006 09:17 AM
mldaalder
I would be interested!

Your thread kept nagging me.:P
December 06, 2006 04:17 PM
Gaiiden
Yessss... mooorreee aartiiclleeeessss...

reviews are cool but I'd like to mix things up a bit more...
December 07, 2006 02:32 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement