New Tour of Mars Script.

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 20 years 7 months
Location: Germantown, Ohio - USA

Post #81by Bob Hegwood » 31.01.2004, 00:03

ANDREA wrote:Moreover I'm trying to put the scripting in the Tour a bit differentiated, I mean not always starting from the lower left, and I found very important the possibility to "Justify" the script from the center and to the right edge. :lol:
I know it's a minor problem, but due to the growing interest that .cel files are obtaining, could it be possible to have this improvement, please? :oops:


Andrea,

I'm not certain that I understand what you want to do, but you CAN modify the location of the text you wish to display on the screen with a script.

Have a look at Don's Scripting Guide... Under the print options, you'll see various "origin" parameters, one of which is "BottomRight." Maybe this helps?

Just thought I'd give it a shot. :roll:

Take care, Bob
Bob Hegwood
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.0 Pre6 FT1

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 21 years 11 months
Location: Rome, ITALY

Post #82by ANDREA » 31.01.2004, 00:04

don wrote:
ANDREA wrote:... I found very important the possibility to "Justify" the script from the center and to the right edge. :lol:
Howdy ANDREA,
This really would be a good addition. However, even with my limited knowledge of programming in Windows, I know it is not an easy addition. Why? Because text in Windows is not text -- it is graphics displayed to look like text. The size and position of graphical text is all relative, to things like font face and spacing, screen resolution, current window size, etc. And, all of the graphical display code in Celestia is written using OpenGL, which few folks here know much about.
In the "good old days" of programming fixed-width text output, it was simple to calculate the beginning horizontal position of a line of centered text. Not so in any windowed environment. BUT, maybe there is already an OpenGL routine to do this? :D Cheers, -Don G.

Well Don, let's hope that some of our Open GL gurus knows how to do this, if it's possible. :D
I'll stay tuned. :roll:
By and thank you. :D

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 21 years 11 months
Location: Rome, ITALY

Post #83by ANDREA » 31.01.2004, 00:31

Bob Hegwood wrote:
ANDREA wrote:Moreover I'm trying to put the scripting in the Tour a bit differentiated, I mean not always starting from the lower left, and I found very important the possibility to "Justify" the script from the center and to the right edge. :lol:

Andrea, I'm not certain that I understand what you want to do, but you CAN modify the location of the text you wish to display on the screen with a script. Have a look at Don's Scripting Guide... Under the print options, you'll see various "origin" parameters, one of which is "BottomRight." Maybe this helps? Just thought I'd give it a shot. :roll: Take care, Bob

No Bob, I mean that I would like to have commands like "rightside", so that I can write all my text line without doing anything, and the result will be that my line will start at a certain column, but will end at the last column available on my screen (or at the previous one, if I give the command "column -1" and so on). :D
Actually, the text with "BottomRight" command is not "justified", as Don says you have to start with a negative column, otherwise your text will go out of the right edge of the screen. :cry:
This means a lot of write and check, and write and check again, and so on, until you'll find the right position for your script start point. :evil:
This means moreover that if you change anything in your script you must start again and again. :evil:
It's a bit disappointing, at least for me. :cry:
Let's hope that as Don says some Celestia OpenGL expert can find the solution, otherwise we'll continue to write starting from the left side, I fear. 8O

Just to explain the reason of my interest on this: 8)
I have seen that if the text is always in the same "bottomleft" position, the spectators of the show can be distracted by the images so that they miss some of the text when it changes. :oops:
If the text changes position at every new issue, the spectator immediately moves the eyes on the new text and has the possibility to read it, not only to see the show. 8O
I have seen this practically, so I'm sure that this could be very helpfull for the educational use of Celestia. :D
By and let's hope :wink:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 20 years 7 months
Location: Germantown, Ohio - USA

Post #84by Bob Hegwood » 31.01.2004, 07:15

Sorry Andrea,

I guess I just mis-understood what you wanted...

You're quite right about the distraction of watching the text vs watching the highlighted features, but I TRY to allow enough time for the viewer to see both the text AND the images. It may not always work, but it's not too badly done at times. :)

I *still* think that you can do what you want to do though... It would just take a lot more work!

Believe me, I know about this. I've been trying to revise the Jupiter Tour for about a week now. The original script took more than a month, and I've got probably another month invested in the Mars script.

You just hafta *love* this stuff don't ya? :wink:

Take care, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 21 years 11 months
Location: Rome, ITALY

Post #85by ANDREA » 31.01.2004, 12:10

Bob Hegwood wrote: I *still* think that you can do what you want to do though... It would just take a lot more work! Believe me, I know about this. I've been trying to revise the Jupiter Tour for about a week now. The original script took more than a month, and I've got probably another month invested in the Mars script. You just hafta *love* this stuff don't ya? :wink: Take care, Bob

Sure, we can do it anyhow but, as you say, why ro use some more work day, after so many used to obtain the Tour itself? :wink:
And YES, I "love" :D :D :D this, and I'll never stop in saying thank you to Chris, Selden, and to the many many other people like you, that provide such an incredible teaching instrument. :D
From me you'll have, as usual, "positive" criticts, requests and suggestions in order to have the best possible script. :wink:
By and thank you again, I'm going to look at your new JupiterTour. :roll:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #86by don » 05.02.2004, 08:23

don wrote:
selden wrote:Don,

I'm sorry to say that it appears that you've found another bug in ATI's OpenGL drivers.
Thank you Selden. I'm happy to at least know what it is. This was the only time I've noticed it, with the Ambient Light cranked up via script. I am running an older version of the drivers, so maybe I'll see what they have now.

Cheers,

-Don G.

Microsoft just released a Windows XP driver update for ATI cards on their Windows Update site (Feb 4, 2004). I downloaded it, installed it, and bumpmaps (in OpenGL vertex program mode) now work properly in Celestia, with my existing ATI drivers! :D

If any other ATI users are having problems, check out the Windows Update site.

Cheers,

-Don G.


Return to “Scripting”