lua-users home
lua-l archive

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


Hi.

I'm a software engineer for a video game company. We currently need a 
scripting language to control various parts of our next generation of 
games (AI, SFX, animation, GUI, ...). Oour original plan was to write 
our own compiler + VM (i have written some in the past so it's not an 
unfamiliar territory for me).

However, now i have stumbled on Lua and wonder if it would be a 
viable alternative. Writing our own compiler and VM would be time 
consuming where as i am assuming i can have Lua integrated into our 
engine in 1-2 days of coding (versus a few weeks for our other 
alternative).

So to help me make my decision, there is a few questions and points 
i'd like to ask about.

* Lua being dynamicly typed, i can see the advantages especialy 
considering some of the code might be written by non programmers. 
However, since type determination is moved from the compiler to the 
VM, what is the actual runtime cost of dynamic types?

* Lua can be extended through function calls. Unfortunateley, this 
implies writing a stub function to grab the parameters from the Lua 
stack and call the actual function (this is pretty much the same 
thing i did with a VM i did, except it could also call functions in 
objects in C++). Now, i'v heard mentioned somewhere in the mailing 
list there was a more efficient way of extending Lua. Is that so? And 
how?

* Since our next generation game engine will work on a limited set of 
platforms (PC, Playstation 2, X-Box). How hard would it be to write 
optimized versions of the VM for such different plateforms?

Any feedback will be greatly apreciated.

Sebastien St-Laurent
Z-Axis ltd.
www.z-axis.com