Wednesday, December 31, 2014

The Ash Entity Framework

I’ve been doing object-oriented programming for over 20 years. I’ve worked with many languages in that time. One can improve their ability to abstract the more they work with different languages. A more challenging exercise is to change your programming paradigm. 

Lately, the paradigm I’ve been experimenting with is entity component systems (ECS). ECS are touted for game programming. A common scenario in games is for things in the game to changes powers and abilities. To solve this issue in the past, I’ve relied heavily on composition over inheritance. In ECS, that idea is taken to the extreme.

The objects (entities) are made up of components (that are mostly value objects), the logic resides in the systems that operate on the entities. After reading an excellent post by Richard Lord, I decided to give his ECS micro framework a try, it’s call Ash.  

The Ash Entity Framework

The Ash Entity Framework uses entity, components, systems, and nodes. Ash facilities the work of mapping the systems to the components they work on. Let me define these:
  • Components are (mostly) simple value objects. They contain little or no behavior.
  • Entities hold components. Entities only care about components. By changing what components an entity has affects which systems affect the entity. This changing of entity composition is important as it impacts node creation as well as which systems execute on it. Entity names must be unique! 
  • Systems operate on lists of nodes. Systems only care about nodes. Systems contain the logic. 
  • Nodes are combinations of one or more components. Node classes are defined and at runtime, an entity that has components matching the definition gets a node created by the Ash engine. Ash also removes and destroys nodes when they are no longer applicable to the entity composition. Node lists use signals--not events--for adding and removing.
The Engine is part of the framework. It knows about entities and systems, both of which you add to the engine. It in turn watches entities and--as they change--adds and removes the components to node collections used by systems. The engine creates the node collections and passes them to the appropriate systems.

Wednesday, February 12, 2014

ABGC On Sale

My course A Blender Game Character is on sale at CartoonSmart thru Saturday, $25 (usually $39) #b3d

Sunday, December 29, 2013

Bits of Blender #67 - Text Boxes

Did you know you could use text boxes/frames in Blender? John and Richard show you how in this Bit.


Sunday, December 22, 2013

Bits of Blender #66 - Object Fonts

Do you know how to create your own fonts using Blender objects? This Bit shows you how.

Monday, December 16, 2013

Bits of Blender #65 - Typography

It's the Bits of Blender Christmas edition! In it we show you how to do some typographic tricks using nodes.

Sunday, December 08, 2013

How to play Astra Itinera

I'm long overdue with this tutorial on how to play my iPad game Astra Itinera. If you've questions you can post here, contact me directly, or post in the facebook group.

Bits of Blender #64 - Scene Linking Revisited