deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.44k stars 192 forks source link

[Feature Request] Custom field groups #1101

Open joshleblanc opened 7 months ago

joshleblanc commented 7 months ago

We can define entities in LDTK right now, and we can define custom fields on entities.

If we could create groups of custom fields called "components", we could implement an ECS system in the codebase simply by implementing systems and allowing LDTK to define the components and entities.

The behavior of a component would be similar to the behavior of a single custom field, given a new tab at the top to define them. For example, you define a component "bumpable" and it has the custom fields "power" and "loot". Now you can add that component to any entity, and it would contain power and loot as custom fields under "bumpable". The values default to the value from the component, but can be overridden.

Basically just a way to group re-usable custom fields to place on entities.