lua-users home
lua-l archive

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

2010/1/19 Rob Kendrick <>:
> On Tue, 19 Jan 2010 16:42:28 +0100
> ingmar wirths <> wrote:
>> My questions now is: how efficient is this solution? How does it
>> scale? Is this approach still sound, when the user controls severel
>> hundred or maybe even
>> thousends of units, all with there own lua instance to be evaluated
>> every frame?
> I'm told that Lua Lanes can scale up to thousands of threads, and that
> works by having each thread be a separate Lua state, and then providing
> IPC between them.

I don't wont to run them in different threads, nor am i worried about
ipc shaping. But anyway, it's god to know, that this is sound.

> Is there a specific reason you're wanting to use different states
> rather than the more usual sand-boxing approaches by using environment
> tables?

Well, as i sad, i want to restrict communication between units and provide
an communication api to enforce this. A glimpse on environment tables
looked promising at first, but on a second thought, since i want to permit
the user to modify the ai, he could probably easy bypass these restrictions.