Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Initial Version and Version 1 of ~archive/LuaInterface


Ignore:
Timestamp:
Nov 30, 2007, 8:56:41 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/LuaInterface

    v1 v1  
     1= Lua Orxonox Interface =
     2[[ArchivePage]]
     3
     4== Overview ==
     5The 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]]
     6Basicly 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.)
     7
     8
     9== Specific Description ==
     10
     11Uml-Diagram:
     12https://www.orxonox.net/attachment/wiki/archive/LuaInterface/Lua_uml02.png?format=raw
     13
     14== Dependencies ==
     15
     16Lua 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]]
     17 
     18== Todo ==
     19
     20Look up how to acces to C++ objects (member functions) in a lua script and how to pass them to the script.
     21
     22== Roadmap ==
     23
     24Mi, 26. April   Design start [[br]]
     25Mi, 03. May     Design finished and implementation start (define classes, make orxonox work with lua) [[br]]
     26Mi, 10. May     Implementation [[br]]
     27Do, 18. May     Implementation [[br]]
     28Do, 25. May     Implementation [[br]]
     29Do, 01. June    Implementation [[br]]
     30Do, 08. June    Project freeze: debug and documentation [[br]]
     31Do, 15. June    Code finished, start creation of the demo world [[br]]
     32Mi, 21. June    content creation [[br]]
     33Mi, 28. June    Content finished: all models work, the world is playable [[br]]
     34Mi, 05. July    Convention and big show [[br]]
     35
     36== Comments ==
     37
     38The Idea is good, althought there are some things that should be made differently:
     39  1. Loading scripts must happen on load-time. Scripts will be Resources, that can be allocated in a fast fashion.
     40  2. Scriptable is a Object, that has a list Scripts, and those scripts each have a unique (per object) ID
     41  3. Calling a Function can then be reached with one of the following:
     42   * execute with scriptname (resolve the script by name and execute)
     43   * execute with ID (resolve the script by ID (i'th number of an Array (much faster (much much faster)))
     44  4. can one also handle parameters given to the function? what form are they?? (strings, ints, values, ...)
     45  5. Give some examples, where we will need the scripting engine inside of the game, and probably some links to lua and stuff...
     46
     47== Links and further reading ==
     48
     49[http://www.lua.org lua]
     50