HooECS is a fork of lovetoys with a bunch of new functionality.
Lovetoys projects are 100% compatible. So if you've been developing with lovetoys so far. Feel free to give this one a try!
Most notable changes:
- Activating and deactivating entities. Remove entities from your systems without removing them from the engine!
- Give entities an update function to be called before any systems! Update your component data to your hearts desire!
- Entity:copy() & Entity:shallowCopy(). Create easy duplicates of your entities!
- More callbacks! React to what's happening!
- A bit of syntactic suggar.
What is ECS?
ECS or Entity, Component, System is a development paradigm that focuses on composition.
In other words. It's a way to structure your code and make sure you write as little duplicate code as possible all while not using inheritance.
Entities are containers for components.
Components are named data bags. Potentially containing some util functions.
Systems get a list of entities which have specific components and execute draw or update functionality on those entities.
This allows for example for an animationComponent and an animationSystem. Create a animationComponent, fill it with quads, an image and a duration and let the animationSystem do all the work. No mixins. No inheritance. Just tag on functionality!
Lovetoys is the original project this library is based upon. All core functionality is the same and any lovetoys project can be used with HooECS.
You can check out the original here
Why create a fork?
Lovetoys implements the basics but there's a bunch of very useful functionality that I found to be very valuable indeed.
The name is also a bit of an issue for some. Googling for lovetoys at uni or school is not really all that fantastic
So I've started to maintain a fork which offers solutions for both.
Some final words
The framework will see some continuous updates. I've labeled it v0.1 intentionally. v1.0 is still a bit out. Not because it's not stable. But because I'm not satisfied enough with it yet.
If you wanna contribute please do submit a pull request anytime. CI tests will automatically run on every pull request. Pull requests won't be accepted if any test fails.
Suggestions, bugs and / or questions are more than welcome! Create an issue on github, respond to this thread or PM me either on this forum or the discord server.
Happy developing! I hope it'll be a hoot!