Releases: juliusikkala/MonkeroECS
Releases · juliusikkala/MonkeroECS
1.2
1.1
General
- Various performance improvements through a new custom data structure utilizing hierarchical bitmasks and low complexity jump-counting
- The "registry" is renamed from
ecs
toscene
, better reflecting how it ought to be used - Added unit tests and synthetic benchmark
Events & systems
- Systems are no longer contained in the
scene
; create them separately and connect them to the scene withscene::add_receiver()
- Removed
scene::add_system()
,scene::ensure_system()
,scene::clear_systems()
,class dependency_systems
- Added
scene::add_receiver()
for making the scene route requested event types to the receiver (= a system) - Added
scene::get_handler_count()
for getting the number of parties receiving events of the given type - Added
scene::add_event_handler()
for adding a callback function for events - Added
scene::bind_event_handler()
for adding member function callbacks for events - Added
scene::remove_event_handler()
for removing event callbacks - Added
scene::subscribe()
andclass event_subscription
for automatic RAII handling of event handler addition and removal
- Removed
emitter
has been removed; you can now emit withscene::emit()
without having to declare emittable types ahead of time
Search index
- New feature! Allows for quick searching of entities based on the values of their components (e.g. find an entity by its
name
component in constant time) - Added
class search_index
that can be specialized to implement a search index for your component type - Added
scene::find_component()
to find components with the search index - Added
scene::find()
to find entities with the search index - Added
scene::update_search_index()
to force a search index refresh (needed if a component's indexed content changes after creation) - Added
scene::update_search_indices()
to force a search index refresh for all known component types
Components & entities
- Pointer stability is now always guaranteed for every component type (
ptr_component
has been removed) scene::reserve()
has been removedscene::emplace()
has been added for creating a component in-placescene::concat()
has been added for copying all entities from one scene to anotherscene::copy()
has been added for copying one entity from one scene to another
Initial release
It should be ready to use in its current state, but no guarantees. The code is originally from a couple years old game engine codebase which is somewhat tested.