= Lua Orxonox Interface = [[ArchivePage]] == Overview == 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. [[br]] 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 == Uml-Diagram: [[Image(Lua_uml02.png)]] == Dependencies == 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.[[br]] == Todo == Look up how to acces to C++ objects (member functions) in a lua script and how to pass them to the script. == Roadmap == Mi, 26. April Design start [[br]] Mi, 03. May Design finished and implementation start (define classes, make orxonox work with lua) [[br]] Mi, 10. May Implementation [[br]] Do, 18. May Implementation [[br]] Do, 25. May Implementation [[br]] Do, 01. June Implementation [[br]] Do, 08. June Project freeze: debug and documentation [[br]] Do, 15. June Code finished, start creation of the demo world [[br]] Mi, 21. June content creation [[br]] Mi, 28. June Content finished: all models work, the world is playable [[br]] Mi, 05. July Convention and big show [[br]] == Comments == 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 == [http://www.lua.org lua]