[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: flua - Lua VM in Flash - my progress
- From: "Jason Neufeld" <jnlopar@...>
- Date: Mon, 2 Jun 2008 16:08:47 -0400
Thanks for all the suggestions so far!
As far as the AVM2 suggestion, I think it's a great idea, I actually
had the same suggestion from the author of tinypy when I was
considering using his system. However, the problem in this case is the
domain of the problem. The game system that I'm building is basically
going to allow for custom user scripting that will be run from the
game engine, but in a sense it needs to be heavily sandboxed. For
example, a script could be attached to a particular object and tell it
how to move around and interact with the world around it, but it
should have no privileges beyond whatever built-in functions it has
been given. I think a direct bytecode compilation would be great if
speed were the only concern, but essentially what's going to happen
here is that the Lua code will be compiled serverside and then
executed from the client as part of the customizable aspects of the
game script. Because of the security and the modular nature of the
engine it seems like having some sort of VM running the scripts is the
best solution for my particular problem. I'd love to hear more
suggestions if you think there's a way around the problem that would
allow me to safely use AVM2 bytecode, because I know it would be
faster and much more efficient.
I do have some good news! since I last posted I've been able to get
the fib time down slightly to 2.5 seconds on normal and 0.001 seconds
Jason Neufeld (Phil. 3:12)
On Mon, Jun 2, 2008 at 1:35 PM, Matt Campbell <email@example.com> wrote:
> Hey Jason,
> This sounds like an interesting project.
> Instead of implementing a VM in ActionScript, you should write a compiler
> that emits AVM2 bytecode, along with a runtime library in ActionScript for
> Lua operations that don't directly correspond to AVM2 opcodes. For more
> information about AVM2, including an ECMAScript compiler implemented in
> ActionScript, see the Mozilla Tamarin project.
> As for an open-source license, I would consider these three:
> 1. MIT/X license: Same as Lua 5.
> 2. Mozilla Public License: Use this if you want to require other
> developers to share modifications that they make to your code, without
> preventing them from using your code in proprietary software.
> 3. GPL: Use this if you want to require other developers to share
> modifications that they make to your code *and* prevent them from using your
> code in proprietary software (or you could use a dual licenses, GPL plus a
> commercial license).
> I hope this helps.