Scripting


3D applications are often organized so that the performance-critical parts are written in C++ while the application itself is written in a so-called scripting language. Scripting languages are typically interpreted allowing a tighter code/execution cycle, and are usually easier to debug than C++. This allows more rapid application development while retaining good performance. Alternatively, the application can be structured where scripts are embedded within a C++ application.

Lua - Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, interpreted from byte codes, and has automatic memory management with garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

LuaPlus - Lua C++ oriented fork with debugging facilities (visual studio plugins), optimizations.

Java - Windows, *nix, Mac; Free. Java is a type-safe byte-code interpreted object-oriented language.

Python - Windows, *nix, Mac; Free. Python is an untyped byte-code interpreted object-oriented language. There is also a work-in-progress library for embedding Python scripts in C++ Ogre applications. For more performance there is also a Python JIT (just in time compiler), psyco.

Ruby - Windows, *nix, Mac; Free. Ruby has received a fair bit of positive press lately as a structured OO language with the power of Perl. Ruby has its own C++ interface, as well as a SWIG interface.

Squirrel - Windows, *nix; Free. Squirrel is a high level imperative/OO programming language, designed to be a powerful scripting tool that fits in the size, memory bandwidth, and real-time requirements of applications like games. Squirrel's syntax is similar to C/C++/Java, but the language has a very dynamic nature like python/Lua. It's API is very much like Lua, too.

AngelScript - Windows, *nix; Free. AngelScript is a high level programming language which has the familiar syntaxes of C/C++. Its designed to be modulative, light-weight, efficient and highly-configurable. It features Run-Time byte code compilation and ability save/load byte code on demand. AngelScript is offered on the ZLib license.

GameMonkey - Windows, *nix; Free. GameMonkey is a high level embedded scripting language, similar to Lua and AngelScript. It has a C style syntax, supports threading and focuses on having a light footprint. GameMonkey is offered under the MIT license.


 

Home    Resources