• entries
    437
  • comments
    1000
  • views
    335427

Data-Driven entities

Sign in to follow this  
evolutional

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 set

2) Method Calls
-- Create a generic methodcall interface
-- Attach methods to entities

3) 'Class' Prototypes
-- Duplication of entities

4) Event handlers
-- Create an event/messaging system
-- Make entities event-aware, using MethodCall interface when event is fired

5) Value Adapters
-- Create abstract adapter interface for Values/Value data for use in scripting/serialisation

6) 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 scripts

7) GameMonkey Script Interface Implementation
-- Create an implementation of the ScriptInterface in GameMonkey Script
-- Create some example scripts

8) 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.
Sign in to follow this  


5 Comments


Recommended Comments

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

Share this comment


Link to comment
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 ;)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now