I am trying to get my head around Lua scripting. Does anyone have any suggestions about the best way to get started?
I have downloaded Chis Laurel's scripts from Sourceforge (http://cvs.sourceforge.net/viewcvs.py/celestia/celestia/scripts/) and the Lua 5.0 Reference Manual (http://www.lua.org/docs.html) and tried to follow the Celestia code that implements Lua script extensions (it's in a file called celx.cpp). Is there anything else that will help?
Has anybody got any Lua scripts that they can share? (the more boring and basic the better )
Does any Celestia specific documentation exist for Lua scripting yet? If not, is there any in the pipe-line?
Many thanks,
Adam
Getting started with Lua
-
Topic authoradamnieman
- Posts: 42
- Joined: 20.10.2003
- With us: 21 years 3 months
- Location: Bristol, United Kingdom
Re: Getting started with Lua
adamnieman wrote:I am trying to get my head around Lua scripting. Does anyone have any suggestions about the best way to get started?
Howdy Adam,
The best way will be to wait until the next or final release of 1.3.1. Lua scripting is nowhere near ready for general use in pre 11. I think Chris added the basic integration code in 1.3.0 (or maybe earlier) but no work has been done on it since then.
However, during the past couple of weeks, Harald (forum member name "Harry") has been doing some fixing and additions in the Lua code that should hopefully be included in the next Celestia release that will make it at least usable for some learning. He is also working on a "list of available objects and their methods". A great big THANK YOU to Harald!
-Don G.
-
Topic authoradamnieman
- Posts: 42
- Joined: 20.10.2003
- With us: 21 years 3 months
- Location: Bristol, United Kingdom
Re: Getting started with Lua
adamnieman wrote:I have downloaded Chis Laurel's scripts from Sourceforge (http://cvs.sourceforge.net/viewcvs.py/celestia/celestia/scripts/) and the Lua 5.0 Reference Manual (http://www.lua.org/docs.html) and tried to follow the Celestia code that implements Lua script extensions (it's in a file called celx.cpp). Is there anything else that will help?
As Don pointed out I am working on some improvements to Lua-scripting as well as a short guide to the available functionality. However I would recommend starting with the normal scripting (and Don's scripting guide ) as many concepts are similar, for instance frames of reference.
adamnieman wrote:Has anybody got any Lua scripts that they can share? (the more boring and basic the better )
Does any Celestia specific documentation exist for Lua scripting yet? If not, is there any in the pipe-line?
I will wait until there is a new version before I publish my short summary, because it describes functions that only then will be available (mostly about moving and controlling the observer/camera) and it is still worked on (and I am not sure about the changes that will happen until then). Of couse I got some scripts here, and at least one (a bit more complex) I will publish.
Harald