lua-users home
lua-l archive

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


Hi,
I don't know exactly the cost of having many different lua states.
However, if you want to avoid it, you can use different global tables in the
same state. That is, use a single state, create a table for each object and
use setglobals to set the appropiate table when using a specific object.



Ignacio Castaño
castanyo@yahoo.es


David Anderson wrote:
> Hi all,
>
> I am thinking about implementing Lua in a MUD engine to allow easy
> modifications of stuff, and for this I need (read "it would be nice") to
> have a separate Lua environment for each object in the game, so that
> variables don't conflict.
>
> What is the memory and speed impact of creating several (dozens) Lua
> environments? Does memory usage grow proportionally?
> Thanks in advance
> David Anderson


_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es