Getting started with Lua

All about writing scripts for Celestia in Lua and the .cel system
Topic author
adamnieman
Posts: 42
Joined: 20.10.2003
With us: 21 years 3 months
Location: Bristol, United Kingdom

Getting started with Lua

Post #1by adamnieman » 23.10.2003, 14:57

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 :wink: )

Does any Celestia specific documentation exist for Lua scripting yet? If not, is there any in the pipe-line?

Many thanks,

Adam

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Re: Getting started with Lua

Post #2by don » 23.10.2003, 16:20

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! :D

-Don G.

Topic author
adamnieman
Posts: 42
Joined: 20.10.2003
With us: 21 years 3 months
Location: Bristol, United Kingdom

Post #3by adamnieman » 23.10.2003, 16:28

Thanks a lot Don, It's good to know what the situation is. I'll stick with .CEL scripting for now. (Expect more cries for help soon :) )

Adam

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 4 months
Location: Germany

Re: Getting started with Lua

Post #4by Harry » 23.10.2003, 17:35

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 :wink: )

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

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #5by don » 23.10.2003, 18:42

Howdy Harald,

Thanks for your update!
I, for one, am jumping up and down (inside at least) at the thought of your additions to Lua! Image

-Don G.


Return to “Scripting”