[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LUA Shell inside my application
- From: Andreas Volz <lists@...>
- Date: Thu, 10 Jun 2004 18:34:00 +0200
Am Thu, 10 Jun 2004 20:12:13 +0400 schrieb Grisha:
> Hi, Dan
> >From my experience - just avoid calling scripts EVERY frame (eg
> handler). Usually most scripting is required for special situations:
> dialogs, taking damage, mission start etc., times for running those
> 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?