AetherInteractiveLtd / Tina

☄ A high-tech framework for the future of experiences on Roblox
GNU General Public License v2.0
10 stars 0 forks source link

ECS: Create entity "prefabs" #67

Open christopher-buss opened 1 year ago

christopher-buss commented 1 year ago

Entity "prefabs" would be a collection of components that could be added to an entity. For example, if we wanted to create an "lamp" entity that always needed a Position, Renderable, Interactable, and Light component, we could just add the collection of components to the entity, rather than needing to add every component individually.

RigidStudios commented 1 year ago

Yeah I've been wanting to do this a lot, do you have an API that you're working on?

christopher-buss commented 1 year ago

https://github.com/AetherInteractiveLtd/Tina/tree/feat-prefabs

This was an initial idea, where we basically just store them as an array of components. This was from a while back; I just pulled out my stash. I never properly figured out if this was the best approach though.