navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 2 (modified by landauf, 3 years ago) (diff)

fixed links

Lua Orxonox Interface

This is an archived page!
This page is very old and the content is not up to date.
Not everything (if any) which is written here will be in the final game!


The goal is to make orxonox scriptable, so that it's easier to let the player interract with the world of orxonox. As scrtipting language we use lua, which we handel through the standart Lua API.
Basicly there is one object, the scriptManager, who manages all the lua scripts, which are wrapped up in a class called Script. A script class contains everything that is needed to run a lua script. The scriptManager executes a script by using a object of type executor. The executor handels everything the script needs to run correctly. (Parameters, etc.)

Specific Description



Lua depends on history.h and readline.h which mus be included externally. On Tardis they are in /usr/pack/readline-5.0-mo/include.


Look up how to acces to C++ objects (member functions) in a lua script and how to pass them to the script.


Mi, 26. April Design start
Mi, 03. May Design finished and implementation start (define classes, make orxonox work with lua)
Mi, 10. May Implementation
Do, 18. May Implementation
Do, 25. May Implementation
Do, 01. June Implementation
Do, 08. June Project freeze: debug and documentation
Do, 15. June Code finished, start creation of the demo world
Mi, 21. June content creation
Mi, 28. June Content finished: all models work, the world is playable
Mi, 05. July Convention and big show


The Idea is good, althought there are some things that should be made differently:

  1. Loading scripts must happen on load-time. Scripts will be Resources, that can be allocated in a fast fashion.
  2. Scriptable is a Object, that has a list Scripts, and those scripts each have a unique (per object) ID
  3. Calling a Function can then be reached with one of the following:
    • execute with scriptname (resolve the script by name and execute)
    • execute with ID (resolve the script by ID (i'th number of an Array (much faster (much much faster)))
  4. can one also handle parameters given to the function? what form are they?? (strings, ints, values, …)
  5. Give some examples, where we will need the scripting engine inside of the game, and probably some links to lua and stuff…

Links and further reading


Attachments (5)

Download all attachments as: .zip