From: Niklas Frykholm Date: 2004-11-24T01:18:02+09:00 Subject: Re: Ruby and the XBox Phlip wrote: > But why do so many game shops use Lua? I am an Xbox programmer and a Ruby enthusiast. As an application language I much prefer Ruby 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 Ruby with C++ (almost all modern game engines are written in C++) is a bit hairy, because you have to maintain two different object models: Ruby'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