Some questions about Defold

#1

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!

0 Likes

#2

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:
https://www.lua.org/manual/5.1/index.html#index

1 Like

#3

Thank you for your answer! I ask you about This

1 Like

#4

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

#5

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

0 Likes

#6

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

2 Likes