Skip to content

Releases: juliusikkala/MonkeroECS

1.2

16 Nov 21:14
Compare
Choose a tag to compare

Bug fixes

  • Fixed 1lu being interpreted as 32-bit on MSVC and breaking buckets
  • Fixed unwanted min and max defines on MSVC
  • Allow lambda functions as event listeners

1.1

11 Aug 10:18
Compare
Choose a tag to compare
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 to scene, 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 with scene::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() and class event_subscription for automatic RAII handling of event handler addition and removal
  • emitter has been removed; you can now emit with scene::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 removed
  • scene::emplace() has been added for creating a component in-place
  • scene::concat() has been added for copying all entities from one scene to another
  • scene::copy() has been added for copying one entity from one scene to another

Initial release

10 Jul 21:34
e957b53
Compare
Choose a tag to compare

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.