• entries
437
1000
• views
335427

# Data-Driven entities

108 views

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.

I would be interested since I've been thinking about implementing something similar one of these days.

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

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 ;)

I would be interested!

Yessss... mooorreee aartiiclleeeessss...

reviews are cool but I'd like to mix things up a bit more...

## Create an account

Register a new account