lua-users home
lua-l archive

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


Hey all! I guess this is my first time here, but hopefully I'll be
able to make a valuable contribution to the lua community.

I've been working on a game project lately. It's based on the old DOS
games ZZT (by Epic Megagames) and Megazeux, an independent production
by Greg Janson a few years later. These games used simple ANSI topdown
graphics, but what was special about them was that they were full game
creation systems. They had simple (and somewhat crude by today's
standards) scripting languages that let just about anybody who was
willing to put the time in learn basic programming skills and create
fun games to share. I really want to capture some of that simplicity
and fun on the web by creating an online game system that allows
people to create games without worrying about overly complicating
things.

A vital feature for this engine is going to be the ability to script.
I've been looking into alot of competing technologies, and I think
I've finally settled on Lua. The problem is, unless I run things
server side (which is slow and expensive on a large scale,) I'd like
to be able to run the scripts client side. So I decided to start
working on a VM implementation in Actionscript that would run on Flash
Player 9. I've built it so far from the ground up based on Kein-Hong
Man's most excellent No-Frills Introduction to Lua 5.1 VM. So far,
I've implemented enough of the VM to download bytecode from a URL and
execute the test fibonacci program correctly. The main caveat, of
course, is that Actionscript is SLOW. I've done extreme optimizations,
though, and am going to do more. Right now the fibonacci at the
default of 24 executes at approximately 2.6 seconds regular and 0.5
seconds cached. Compared to the C VMs 0.04 and 0.00005 this is
extremely slow, but consider that when I first had it working it would
time out (> 15) seconds, then I got it down to 12 seconds, finally
down to 3.5, and now today down to 2.6, (this all on my 2.4ghz core
duo macbook pro) so there is alot of room to bring things down.

I'm basically asking for any input, and most importantly, just any
interest on the project. I have a couple weeks to work on it until I
go work at a summer camp for kids for 2 months, which won't really
allow me to do any coding, so I want to know if I should finish the
opcodes and get a release version before that, since otherwise I can't
really do any work on it until august. I also need to figure out the
appropriate open source license to use for the code.

Thanks for your time!

Jason Neufeld (Phi. 3:12)