[ LiB ] | ![]() ![]() |
Lua is no slouch when it comes to graphic application integration. lua owns a handful of open engines and even one that has been used in several commercial games. Although it is uncommon to find a completely Lua-based graphic engine, it's extremely common to find engines that rely on lua to perform the underlying scripting.
Apocalyx is an OpenGL 3D engine that includes lua scripting support. The engine comes with a built-in console that can be launched and will fire lua scripts or execute lines of Lua. The following commands are viable on the command-line console:
h. Reads the complete list of commands.
l. Reads a list of the scripts.
r. Executes a script.
c. Compiles a script.
i. For entering lua lines.
Apocalyx has an entire API with exposed features and classes for lua to manipulate. These classes are highlighted in Table 8.18, but for complete reference, check out the online manuals at the Sourceforge project page, at http://apocalyx.sf.net.
Class | Purpose | Child classes |
---|---|---|
Background | Used to render the sky and out of reach background objects | HalfSky |
Image | Converts images and checks for alpha | Texture |
Material | Holds the light properties of a surface | BumpedMaterial |
Reference | Changes position and orientation of objects in 3D space | Transform (parent class), Camera, Object |
Sample | Creates sounds | Sample3D, Sound, Music |
Simulator | Holds physics data | ParticleSet |
Socket | Holds methods for networking | Host |
Terrain | Renders the ground | Scenery |
Win | Manages application window | Scene, World, Filesystem |
Zip | Holds methods that retrieve data from zip files |
Doris is an OpenGL viewer driven by Lua. It uses Lua, bound to OpenGL, GLUI, and GLUT, for creating graphics scripts. Doris was mainly built to perform graphical experiments, but it is also great sample code for learning how to code with Lua, OpenGL, and 3D.
Doris can be found on the Doris Sourceforge page, at http://doris.sourceforge.net. Doris was created by Nick Trout and named after his pet hamster. Currently there are versions of Doris for both lua 4 and lua 5. The Sourceforge page includes lua code samples.
Nebula is an open-source, 3D, real-time game engine written in C++. Nebula is actually scriptable through a number of languages, including both Python and Lua. It supports Direct X (8.0 and 8.1) and OpenGL and currently runs on linux and Windows worlds.
Nebula is a base technology engine released by Radon Labs in Berlin, at http://www.radonlabs.de. Radon is responsible for a few large game products, including Project Nomads, released by CDV in 2002, and Urban Assault, released by microsoft in 1998.
Radon is currently at work on the second generation of Nebula, Nebula2, available as a Sourceforge project. This new version of Nebula will include a new graphic system and subsystems and improvements to the code used for programming on the X-Box and will also incorporate changes made to the Nebula engine from the recent publishing of a few Radon games. Radon also plans to port Nebula to OpenGL and linux and do a rewrite of lua and Python support for the new engine. For more information on Nebula, check out the Nebula Wiki, at http://nebuladevice.sourceforge.net/cgi-bin/twiki/view/Nebula/.
[ LiB ] | ![]() ![]() |