lua-users home
lua-l archive

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


Luists:
 
I asked news:comp.lang.brand_X whether brand_X would be good for scripting games from the XBox, and got this nice summary of Lua's strengths:
 
----
 
I am an Xbox programmer and a brand_X enthusiast. As an application language I much prefer brand_X to Lua. However, as an extension language, and in particular, as a game scripting language, Lua has a number of advantages:

- It's small. The implementation is small. The syntax and semantics is
   small and flexible. The standard library is small.

   Being small is of course an advantage in terms of memory footprint.
   But even more important -- being small makes the language easier
   to hack. It is easier to get the language to fit with your existing
   engine and do exactly what you want without having to deal with
   a lot of excess baggage.

- Garbage collection. Garbage collection is scary for any real-time
   application. Lua has (in the latest beta) incremental garbage
   collection.

- Byte code. Lua compiles to byte code, so you don't have to run
   an in-game parser.

- No conflicting object model. Interfacing brand_X with C++ (almost all
   modern game engines are written in C++) is a bit hairy, because
   you have to maintain two different object models: brand_X's and C++'s.
   Since Lua has no inherent object model (objects are "simulated" with
   tables) it is easier to build an object structure that exactly
   mirrors the one on the C++ side.

// Niklas Frykholm

----
 
I disagree with the last point. I feel that matching an object model between the two layers is an empty victory. Both sides should use a comfortable object model tuned to help folks who write code in those layers. The Lua layer should present game objects, and the C++ layer should present engine concepts.
 
-- 
  Phlip

<<winmail.dat>>