Topic: Lua class library

I'm creating a little lua classes set that makes common things ( autonomous movement of enemies , light effects , etc )

It could be nice to create a library of common things to use it in lua

Re: Lua class library

Generally why it would be bad to use scripts for behaviours?

Re: Lua class library

It's not bad but it can be non optimal if the behavior is complex, lua is a dynamic langage and is not compiled in native code like c++.

Generally, a scripting langage is used for the general logic and complex behaviors like AI are done in c++,
but it's a balance to find depending on the project and the platform. Lua is still quite fast.

A complex script will run more or less 10 times slower than the same in c++ (depend of the complexity).