v0.7.7
This version serves primarily as a big stability update. Some critical parts of the code were fixed and more unit tests were added.
No real new features were added for the end-user but a lot of tweaking happened behind the scenes which helped improve performance and memory consumption of the system.
One such example is removal of archetype. If left empty (no entity in the world belonging to them) for a few dozen of frames, the world automatically deletes the archetype making it a bit more faster for any new queries to match archetypes. Memory consumption is also lowered.
Components now have meta-data encoded inside their identifier directly which means we no longer have to make component descriptor lookups so often.
World iteration was simplified. Any iteration has to happen explicitly via queries now. Previously existing ecs::world::each was removed because it was not flexible enough and served as just another way to iterate the world. This way, the API is cleaner and more expressive.
Fixed:
- chunk allocator would break if a huge number of pages were requested at once c6fba0f
- query lookup no longer hacked in 40d22de
- ecs::Query::arr() used chunk view rather than iterator view to match results 20b8113
- constructors/destructors were not called in some cases in containers 45151d5
- container reallocation not handled correctly in some cases 45151d5
- container erase functions not working correctly in some cases 45151d5
- container comparisons not working correctly 45151d5
- container resizing 78821f8
- GAIA_ASSERT not working with complex expressions b1c9253
- unique component constructors not called only automatically with chunk creation ab5d9f4
- GCC 13 stringop-overflow bug workaround f7f48e7 d1fbd93
- wrong type deduction on view_auto 3b1f433
- component cache wouldn't properly zero-initialize for component descriptors 42b179c 149bc99
- empty archetype lifetime handling 840c613
- empty chunks not removed properly f08d5f005d188c0e6a8987f6bf4c32a254eb342
Changed:
- Archetype::archetype_id() renamed toArchetype::id() d686233
- CK_Generic renamed to CK_Gen 56c0e8a
- CK_Chunk renamed to CK_Uni 56c0e8a
- components turned into uint64_t with meta-data encoded inside 36068d3
- archetype graph diagnostics turned back on after being disabled accidentally 6c5b643
- chunk component renamed to unique component to avoid confusion with Chunk 56c0e8a
- quom installed into a virtual Python environment if not previously available af49471
- [breaking change] T& used for mutable type in queries so it is less confusing and more in-line with how c++ type system works eb39152
- some template guides replaced with decltype(auto) for improved readability and type deduction e02f7cb
Removed:
- [breaking change] ComponentInfo merged with ComponentDesc 36068d3
- GAIA_USE_SIMD_COMP_IDX removed 36068d3
- [breaking change] Iterator*::each template removed because some compilers wouldn't vectorize it (MSVC) and it didn't really help with anything cdfb6ea
- [breaking change] world::each removed in favor of query::each as it was not flexible and served as just another way to iterate the world 67f66b4
Tweaked:
- fast-path for component descriptors up to 1024 elements. Use a map after that 149bc99
- components turned into uint64_t with meta-data encoded inside in order to eliminate component descriptor lookups in many places 36068d3
Added:
- profiling mode added to each performance benchmark 929f50b
- number of defragmented entities per tick can be changed via world::defrag_entities_per_tick d25d8b6
- added GAIA_FOR family of macros 720568d
- added GAIA_EACH family of macros cdfb6ea
- archetypes removed when kept empty for a few frames df08d5f
Full Changelog: v0.7.6...v0.7.7