While building flix (and a number of other projects) I wanted a way to manage objects in an ECS manner at runtime. Defold’s game objects are built around this idea, but I was looking for something a little agnostic and with some interesting features.
I found Tiny ECS here:
Its a great little lib. Has some nice documentation and more importantly has some of the key features I was looking for. For clarity these were:
- Generic tables as objects (no userdata etc)
- Easy to make collections (they use System filters)
- Able to iterate or execute specific updates on an entity
- Small and easy to implement
As it stands, if you need a good ECS lib for lua, this is a great little toolkit. I then decided to take defnet (with some of my own modification ) and make a http server backend for it.
Thus when you are running Tiny ECS you can popup a webpage, and view whats happening to your world, systems and entities. I am also adding ability to modify alot of the ECS at runtime as well.
Extracting it all out of flix and making an example has been a bit messy. Some good things that happened though, I found a tun of bugs and design issues which I fixed
However, some code will still need to be updated (specifically on the modification side). Its usable enough right now for people to play with and Ive started this diary so as to track any updates I do and any questions people might have if they want to use it. (or dare to)
I will try to get most of the features from flix into it if possible. The animation for instance, I really want to get in, but thats on the end of my todo list atm
Ignore all the placeholder html pages. They should be updated in the coming days. Except for the anim and movie pages - I might remove them to stop any confusion)
Happy to hear thoughts and ideas on it. Its turning into a very useful tool for me. I’ll try to make some bigger examples too, since thats where it becomes most useful.