Home - Forums - Documentation - Gallery - Bugs

Creating a LUA plugin

Short indtroduction

In this tutorial we will create a plugin for integrating Lua. That means, you can reach the the whole CS API with LUA scripting. Note, you can any SWIG supported language integrate easily into Crystal Space. In that case, when SWIG is new for you, please have a look at the project here:

SWIG homepage

A note about the history of this plugin. The source itself is just partially my work. The original code written by Brandon Ehle in 1999. I started to update the code, but the greater part of the code written by Mildred. Many thanks, Mildred!

Let us begin

The very first step is download, complie and install LUA. You can get it from the official site:

LUA homepage

This tutorial use the LUA 5.1 version.

The next step is setting up an axternal CS project within your enviroment. Don't follow to set up your project as a dynamic link library, and the neccessary CS and LUA libs. The concrete steps depending from your IDE and operating system. ( This is a so called "professional" tutorial. Professional tutorials are not just C++ masters , but I assume, you can set up this project without any external help.)

| Article | Discussion | View source | History |