lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi, Andreas

I can't advise calling any script for every object per frame, but if your
object count is small probably it'l work fast enough. Generally Lua is ten
times slower than C code (which is good for scripting language), but
probably you will need to benchmark your scripts yourself.

Lua does have the ability to precompile scripts, you can take a look at the
luac.c file in your lua distribution. Note that scripts are compiled on
load, so compiling in advance will reduce only load time, not execution


----- Original Message ----- 
From: "Andreas Volz" <>

> Another reason I like to embed LUA is because I want to give users the
> ability to write LUA scripts which are executed every frame, give data
> to LUA, do some "things" and give them back to C++. Is LUA fast enough
> to so this (25fps)? It's not much data, only 5-10 objects with some
> x/y/z/angle data. Perhaps LUA has the ability to precompile scripts or
> cache them if they're used very often?