A fast and flexible archetype-based Entity-Component-System library for Lua, designed for high performance and simplicity.
evolved.lua is an Entity-Component-System library for Lua that provides a structured way to manage game entities through components and systems. It solves the problem of efficiently handling large numbers of entities with varying data by using an archetype-based storage model, enabling high-performance iteration and processing.
Lua developers building games, simulations, or other data-intensive applications that require efficient entity management and system processing.
Developers choose evolved.lua for its blend of performance optimizations, flexible query system, and clean API, making it a robust alternative to other Lua ECS libraries while maintaining simplicity and extensibility.
Evolved ECS (Entity-Component-System) for Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses an archetype-based model with Structure of Arrays (SoA) for contiguous memory storage, enabling fast iteration and minimal garbage collector pressure, as highlighted in the performance section.
Supports includes, excludes, and variant fragments for precise entity filtering, allowing complex system processing with deferred and batch operations for efficiency.
Offers a self-explanatory API with functions like evolved.spawn and evolved.execute, reducing boilerplate while maintaining extensibility through fragment hooks and custom storages.
Works with Lua 5.1+ and LuaJIT, as shown by the extensive CI badges, making it suitable for various environments including game development and simulations.
The library explicitly warns that inserting or removing fragments causes entity migration between chunks, which can degrade performance if not managed carefully in critical code paths.
The README admits that not all desired optimizations are implemented yet, which may lead to suboptimal performance in edge cases or require future updates.
Concepts like chunks, fragments, and deferred operations, while powerful, require prior ECS knowledge and can be challenging for newcomers, despite the clean API.