lua-users home
lua-l archive

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


Am Thu, 10 Jun 2004 20:12:13 +0400 schrieb Grisha:

> Hi, Dan
> 
> >From my experience - just avoid calling scripts EVERY frame (eg
> >onTick()
> handler). Usually most scripting is required for special situations:
> dialogs, taking damage, mission start etc., times for running those
> scripts
> will not affect performance much (even if they are relatively complex)
> because they are not called often.
> 
> Just for example, you can refactor this code:
> [...]

Ok, I see now calling LUA each frame isn't a good idea. But how can I do
the "shell-thing" I asked in my first posting?

And which is the best way to transfer my C++ object data structure to a
LUA script, change it and then return it? Should I package all values in
a table and later read it back from the table to the object? Or is there
a more "generic" way?

regards
Andreas