flecs-hub / flecs-lua

Lua script host for flecs
MIT License
51 stars 9 forks source link

API discussion #1

Open randy408 opened 4 years ago

randy408 commented 4 years ago

I have no idea how to approach this yet.

Lua ECS implementations for reference:

entitas-lua tiny-ecs ecs-lua (tiny-ecs fork)

ArnCarveris commented 4 years ago

My old lua API draft for flecs: https://gist.github.com/ArnCarveris/52c077d32dd1e84ad8bc1a2e89dfdc8d

randy408 commented 4 years ago

~Looks like ecs.add() is not aware of type roles and the API for adding them is slightly different, this could probably fixed by checking the arg type and using ecs_add_entity() instead.~ fixed