Page 1 of 1

Script: the nine planets

Posted: 18.02.2004, 00:42
by Harry
Hi,

I've written a script which uses some of the new CELX-features available in Celestia 1.3.2pre1 or newer, notably MultiViews. It's short (~ two minutes), not a tour.

Have a look:
http://www.h-schmidt.net/celestia/nineplanets_v1.0.celx

(please report problems and bugs, but make sure you are using Celestia 1.3.2pre1)

If somebody cares about what new features are used:
- MultiViews
- table-based renderflag and location labels get/set
- the really overdue gotodistance, as well as getfov and preloadtexture
- Cleanup Callback (should avoid changing your settings when you run the script)

Harald

Posted: 18.02.2004, 04:29
by Bob Hegwood
Harry,

Cool script. 8)

Just so you know about though... It caused my Intel graphics display to go Blooey! All kinds of neat colors for stars and planets.

That's just because my graphics are limited though. It really is a cool script.

Thanks for the "I'll show you!" :wink:

Take care, Bob

Posted: 18.02.2004, 09:35
by chris
Cool! That's the first time I've seen your multiview script functions in action, and I'm very impressed. Great work! I like the new table-based method of setting render flags . . . I think it's much more in the spirit of the Lua language.

--Chris

Posted: 18.02.2004, 19:27
by JackHiggins
I'm not usually big into scripts, but as an example of what celx can do, this one is pretty good!

Re: Script: the nine planets

Posted: 19.02.2004, 02:12
by don
Harry wrote:If somebody cares about what new features are used:
- MultiViews
- table-based renderflag and location labels get/set
- the really overdue gotodistance, as well as getfov and preloadtexture
- Cleanup Callback (should avoid changing your settings when you run the script)

EXCELLENT MultiView script Harald! :D

It shows off the new features in Celx quite nicely. 8O

I especially like the Cleanup Callback. Sure wish CEL and cel://urls had this.

Tested with 1.3.2 p1, as I've not been able to get Chris' second p2 version from shatters.net. It is very slooooow and then at 7MB or 8MB it thinks the download is "complete" <sigh>. I'll get it eventually. Is the link on your site to the first or second release of pre2?

Thanks for sharing this script with us Harald!

Cheers,

-Don G.

ADDED LATER ... Seems to work fine in pre2 as well -- both on WinXP.

Re: Script: the nine planets

Posted: 19.02.2004, 14:47
by Harry
Thanks for the "thumbs-up"! 8)

Chris, I am glad you like the table-based getrenderflags. While it adds to the bloat I thought this would be the best solution for having a pair of get/set methods for renderflags.

Harald

Re: Script: the nine planets

Posted: 19.02.2004, 16:28
by Christophe
don wrote:I especially like the Cleanup Callback. Sure wish CEL and cel://urls had this.


cel:// urls do have it, the 'setting' mode was introduced just for that.

The problem is that there is no way to use those from the Windows interface, the best way for now is simply to use a 'location' with your preferred settings.

Re: Script: the nine planets

Posted: 19.02.2004, 19:24
by don
Christophe wrote:cel:// urls do have it, the 'setting' mode was introduced just for that.

The problem is that there is no way to use those from the Windows interface, the best way for now is simply to use a 'location' with your preferred settings.

Isn't this a KDE-only feature? Or is it also in the GTK version?

-Don G.

Posted: 20.02.2004, 08:40
by Christophe
Since Pat is trying to keep the GTK version as close as possible to the Windows version, I think it's only available in KDE.

To take full advantage of it, you'd need to replace locations with cel:// url bookmarks as it is done for KDE.

Posted: 20.02.2004, 19:00
by don
Okay, now I remember -- KDEs built-in bookmark stuff. Sorry, my memory just isn't what it used to be <frown>.

Thanks Christophe.

-Don G.

Re: Script: the nine planets

Posted: 14.11.2004, 16:46
by ANDREA
Harry wrote:Hi, I've written a script which uses some of the new CELX-features available in Celestia 1.3.2pre1 or newer, notably MultiViews. It's short (~ two minutes), not a tour. Harald

Hello Harald, I enjoyed your tour when issued, but I didn't use it for public shows up to now. :?
I've decided to do it, but for this I should need some change, i.e.:
1- at the end of the script I would like to have ALL the nine windows open and available, in order to have the possibility to make operations on the single planets (e.g. turn one planet to have its sunlight side on view, etcetera) :wink:
2- I would like to start it from an icon on desktop, and with full screen at my screen resolution (1024x768), but the system used for .cel scripts (spacespace--fullscreen in WIN XP) doesn't work. :cry:
Any other solution? 8O
Thanks a lot for your help.
By

Andrea :D

Re: Script: the nine planets

Posted: 14.11.2004, 19:03
by Harry
ANDREA wrote:1- at the end of the script I would like to have ALL the nine windows open and available, in order to have the possibility to make operations on the single planets (e.g. turn one planet to have its sunlight side on view, etcetera) :wink:
Just delete the block (about 10 lines) at the end of the script, i.e. everything below

Code: Select all

celestia:print("Enough!", 2, 0, 0, -2, -2)
.
Does this do what you want?

Note that the script also resets renderflags, time etc. to the setting before the script started. If you don't want that, simply delete the function "celestia_cleanup_callback" at the top of the script.

2- I would like to start it from an icon on desktop, and with full screen at my screen resolution (1024x768), but the system used for .cel scripts (spacespace--fullscreen in WIN XP) doesn't work. :cry:
Any other solution? 8O

What happens when you try it?

If it doesn't work, you could try to start the script by replacing the "start.cel" in celestia.cfg with the path to the nineplanets.celx script, i.e. use it as the start-script.

Harald

Re: Script: the nine planets

Posted: 14.11.2004, 23:18
by ANDREA
Harry wrote:
ANDREA wrote:1- at the end of the script I would like to have ALL the nine windows open and available, in order to have the possibility to make operations on the single planets (e.g. turn one planet to have its sunlight side on view, etcetera) :wink:
Just delete the block (about 10 lines) at the end of the script, i.e. everything below

Code: Select all

celestia:print("Enough!", 2, 0, 0, -2, -2)
.Does this do what you want? Note that the script also resets renderflags, time etc. to the setting before the script started. If you don't want that, simply delete the function "celestia_cleanup_callback" at the top of the script.
What happens when you try it? If it doesn't work, you could try to start the script by replacing the "start.cel" in celestia.cfg with the path to the nineplanets.celx script, i.e. use it as the start-script. Harald

Hello harald, thanks for the quick reply. :D
I modified the script, and now it works as I need, appreciated. :wink:
Regarding the display mode, you gave me the idea, and I applied it on the contrary, i.e. I named in the .cfg file the "InitScript" as "start.celx" instead od "start,cel", and in the desktop icon I gave the command as usual, i.e.
E:\CelestiaNinePlanetsTour\celestia.exe --fullscreen 8O
It works, and now the script starts with full screen at 1024x768 resolution. :D
Thank you very much.
By

Andrea :D