A sparse set implementation of an Entity Component System.
Table of Contents
LEntity is an implementation of an Entity Component System, which is a data-oriented game design pattern which allows for a flexible and fast way to create Entities when making a game, and attach Components to them. It was originally created as part of a small game engine I am developing called Labyrinth, however I decided to separate it for easier development and testing.
LEntity uses a sparse set implementation which allows for components to be stored contiguously in memory. Each component has its own manager which stores the components in chunks in order to allow for an uncapped number of entities with components stored dynamically and efficiently, rather than hogging up lots of memory in order to reserve space for all the possible components.
LEntity currently only supports premake, but it would probably not be too hard to add support for another build system. I intend to look into this in the future.
LEntity requires:
- C++17
- A compiler that supports the
__FUNCSIG__
or__PRETTY_FUNCTION__
preprocessor macros.
- Clone the repo
git clone https://github.com/amayesingnathan/LEntity.git
- Run the setup script in the scripts folder. Currently only windows batch and linux bash scripts are provided.
./scripts/setup.sh
- Follow prompts to download premake on first installation. This will generate project files for windows or linux.
In development...
- Groups
- Improved testing and benchmarking
- Expand registry API
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion or feedback that would make this better, please open an issue with the tag "enhancement". Feel free to fork the repo and make a pull request, however this is only a personal project so I may not respond quickly.
Distributed under the MIT License. See LICENSE
for more information.