This is how you do it:

  * Hey entity, i have something for you. It is called "MOVE NOW NORTH"
  * Ok, let's see who wants this. Take this, components:
  * \- AI: I don't want this
  * \- Inventory: I don't want this
  * \- Stats: I don't want this
  * \- Position: Ok. Move north you say? I'm doing this



The data oriented would be:

  * For each AI component:
  * \- Do you want to move? Then find your position component and copy it to 
the active movement arrays (maybe just the index).
  * For each Position component in the active movement array:
  * \- Check colision, update position.



But again, if you don't mind performance, you barely gain anything.

Reply via email to