Basic Concepts

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group at PUC-Rio, the Pontifical University of Rio de Janeiro. Gideros Studio benefits from Lua, a powerful, fast, lightweight, embeddable scripting language. Lua’s power comes from its simplicity and speed. Lua is mentioned as the fastest language among all interpreted scripting languages.

Lua is used in commercial applications, including Adobe's Photoshop Lightroom, World of Warcraft, Far Cry, Garry's Mod, Supreme Commander and Sonic the Hedgehog. It’s widely used in many applications, where speed and convenience is sought. You also write your applications in Lua inside Gideros Studio, however can also extend your apps with other languages like Objective-C, C++, C or Java.

Despite the size of the Lua interpreter (about 150Kb in size), Lua is a very rich, extensive and expandable programming language. Applications written using Lua looks very clean and understandable, yet effective.

Let’s start with printing a sentence, by writing down the following and running in Gideros Studio:

print ("Hello, Gideros Studio")

Here print() is a Lua function. We invoke a function using a paranthesis, and print takes the text between double quotes and writes to standard output.

We use "--" to start a comment, or use --[[ to start a mult-line comment. Consider this example:

--[[ This is a multi-line Lua comment
            Where comment goes on and on...
             And on...
]]