Wednesday 25 January 2012

Event Manager.


To get information between different parts of a game, you may use events and a event manager, and event is anything happening in the game, that something else might have interest of, this could be shots fired, units dying, change in score, a unit turning visible, so about anything.

The main goal is that, once something happens, you inform all with interest that it happened, and do it once, instead of a system where you for instance save all events and loop trough them for each and every unit and deciding if they are relevant, the second one is much faster to set up, but requires a lot more prestanda, and a good event system can be used and reused for anything.

So thats where I am going today, trying to get the events up and running in a good decent way.

No comments:

Post a Comment