Some questions about Defold


Hello! I try understand defold by source code, where live lua engine(in main thread)?
And next question, you have light class in c-code but no one word in documentation about how call it from lua not exist, please explain it if you could, thank you!



Yes, we have one Lua context, and it lives on the main thread.

you have light class in c-code

Are you referring to Lua’s lightuserdata?
There is not much documentation about it on their documentation page:

1 Like


Thank you for your answer! I ask you about This

1 Like


Ah, yes. That is an old class, that is deprecated.
We keep deprecated classes around, but remove the documentation for them. We keep them for backwards compatibility only. We aim to remove them at some point.

1 Like


And another one, render-thread and lua-thread separated? Or all game logic process first and the start rendering?



We currently render on the main thread. See engine.cpp.