Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Jun 2009
Offline Last Active Nov 27 2012 08:39 AM

Posts I've Made

In Topic: Rendering highlights on 2d map based on grayscale texture

23 November 2012 - 06:50 AM

Thanks for the input!

I don't see why that wouldn't work and why I didn't think of it :) I will tinker a bit and get back!

In Topic: Component Based Entity System Design - Phase 2: post 30

28 July 2010 - 08:41 PM

Here are some newb-thoughts of mine.

As I understand it:

If you have a component, you will also need a corresponding system; an implementation acting upon a particular component. The components are just data, they don't know about eachother or anything for that matter, they are just containers. The systems however, sometimes will need information from several different components.

Take the ExplodeOnDeath-example. If you have such a system, it's likely that there's also an ExplodeSystem and maybe a HealthSystem.
The ExplodeOnDeath-system would fetch all entities with an ExplodeOnDeath-component and check the Health-component of the same entity if the hp have reached zero and if that's the case, the system would add an Explode-component.
The Explode-system would then pick up the entity and do what that system does, maybe start an animation in an Animation-component, which the RenderSystem
would pick up on and so on.

The ExplodeOnDeath-system would need to select all entitites that has a ExplodeOnDeath-component and then for each entity, fetch the Health-component.
These kinds of queries seems eerily sql-like and would fit well with a relational database structure.

The fact that an entity posseses a particular component, acts as an "event" in it self and i don't see the need for a further event managing "system".
I haven't gotten that far in my implementation though so the need might arise.

Just some thoughts.