Data Driven, enter Component branch

The last 6 months we have been experimenting with and prototyping data driven entity systems as well as writing boilerplate for a completely new codebase.

Current code has statically defined entity types which were tedious to expand functionality for, large if else statements defining logic for each entity type lingered through out the code.

Now, the entity class is just a list of components and components just a list of properties. A property basically is a key-value pair. All just data.

When an entity is created/loaded it's components are registered to manager classes which subscribed to that component type, the managers define the logic for those components.

For example a 'ResourcesManager' (resources being a collection of health/stamina/willpower) would just iterate all it's registered components and regenerate points in each resource.

The real power of all this is in assembling components, as the logic is independently defined by the managers and not lingering throughout the code, you can throw all these components together to easily form new entity 'types'.

You add some components to form a basic item, then you add damage and equipable components, to form a weapon, give it the name 'Sword of Justice' and then, just to go crazy, add a dialog component. You now have a talking sword, handy for those pesky settings people defined quests :)

A template system with inheritance support makes all of this user friendly.
So you don't have to write templates from scratch each time, you can define an item template and then the weapon template would inherit from that, so the weapon template only has to define the damage and equipable components, templates can overwrite property values defined in parent classes so an 'Alpha Wolf' can easily up it's strength from it's parent class 'Wolf', to make the picture complete.

To wrap things up, we're currently finalizing the network design which will synchronize property values between server and clients, this will abstract the actual network usage, so instead of sending a network message to change a property, you just change that property.

We hope to have a chat client out soon, to prove the concept and for you developers out there to experiment with.

See you in-game!

 

User login