lua-users home
lua-l archive

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


@Jim Whitehead II

I am actually not expecting changes to occur in the script, but only executing a script procedure every frame. It would be commonly coded in C/C++ (as it is now), but in Lua I would have more flexibility for tweaking things and if I am able to make it not so expensive, I could have both advantages.

2009/9/19 Jim Whitehead II <jnwhiteh@gmail.com>

Do you need changes to the script to be picked up immediately, or can you watch for changes to the filesystem and on change, recompile the script? In this way, you could avoid doing something costly each frame.

On Sep 19, 2009 5:16 PM, "zweifel" <zweifel@gmail.com> wrote:

hmm, these are a good solution when I just want to run the script once.

But in my case I do want to run the Lua script every frame. I just wanted to know if I should bother with a hash_table and luaL_loadbuffer or just use luaL_dofile because Lua already does some caching of files that was already read before.


2009/9/19 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>

> > > The question: Would it be reasonable to create a hash table with the Chunks > > already read ...




--
God$ g++ -o earth earth.cpp -O3 -lanimals -lplants -lvirus

http://fog.neopages.org/



--
God$ g++ -o earth earth.cpp -O3 -lanimals -lplants -lvirus

http://fog.neopages.org/