Goal
We want to define components, store them in an efficient manner and make them accessible to systems.
We want to define events along with their types and make them available to systems.
We want to define systems that operate on lists of components, are triggered by other systems through events.
Implementation
For each component type there will be a list that is a tuple of an entity ID and the component values. There will also be a map from entity IDs to component list indexes.
A system will consist of state, iterators over components its subscribed to and any number of functions that are triggered by events.
Syntax
component!
// event! { GameStarted } // This one is implicitly defined
event!
event!
system!
system!