Pausing without time-reset and full-screen in CEL-scripts

All about writing scripts for Celestia in Lua and the .cel system
Topic author
kramskov M
Posts: 6
Joined: 01.01.2006
With us: 18 years 10 months
Location: Denmark

Pausing without time-reset and full-screen in CEL-scripts

Post #1by kramskov » 29.09.2007, 10:34

A problem with the full screen mode:
I am working on a script for educational purpose and I want to distribute it to students on a CD including the Celestia program etc (Celestia 1.4.1 for Windows). I have written a CEL-script and on the CD it is started with the command line --full-screen, so it can run in full screen mode. However, when Celestia runs for the first time the default resolution for full screen mode is not the current resolution of the screen (which I think would be the obvious choice), but 640 x 480. As far as I can see, you have to start Celestia (as an administrator) and manually set the full screen resolution before the script can run in full screen mode in the default screen resolution.
If I omit the parameter --full-screen I can make it run fine in a maximized window in the current screen resolution (but it is more pretty in full screen mode).
Any suggestion to a solution?

Another problem:
I would very much like to be able to pause the script. When you are doing that by pressing 'space' it is also resetting the time, i.e. if the script is running fx by a time factor of 1000 x, that time factor will be reset to real time when you press 'space' a second time to continue the script. I my case that means the rest of the script will be played incorrectly.

Is there a way to pause the script without resetting the time?

Best regards
Kurt Ramskov

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 2 months
Location: NJ USA

Post #2by LordFerret » 02.10.2007, 06:38

Hello Kurt,

I have not experimented with Celestia's full-screen option, so I can't help you any there - but I'm sure someone here will, shortly.

As for the .cel scripting, there is a command "timerate" which allows you to change Celestia's time multiplier. You'll find this command documented in the Cel_Script_Guide_v1-0g file (see the Scripting Guides section) found here:
http://www.celestiamotherlode.net/catalog/documentation.html

Basically, its usage is -
timerate { rate n }

Where special values for n are -
0 = pause time
1 = reset to real time

:D

*EDIT*
Oops! I almost forgot... the actual pause... for this you'll use the "wait" command (also documented in that guide).

Usage -
wait { duration s }

Where s = seconds.

Topic author
kramskov M
Posts: 6
Joined: 01.01.2006
With us: 18 years 10 months
Location: Denmark

Post #3by kramskov » 02.10.2007, 08:23

Hello LordFerret,

Perhaps I did not describe my problem clear enough. I am fully aware of the CEL scripting commands timerate and wait, and use them a lot in the script.
However, I would very much like to be able to pause the script FROM THE KEYBOARD, for example when I am using the script in a teaching situation and want to pause it and add some comments before it is activated again.

The problem appears when the script runs Celestia with a time rate different from real time, for example a time rate of 1000x. When I pause the script by pressing 'space' in such a situation, the timerate will be reset to real time when I press 'space' one more time to continue the script.

So I am looking for a way to manually pause the running script (and Celestia) for a while and then be able to reactivate the script from the point it was paused with Celestia in exactly the same state as it was paused (including the same time rate).

Regards Kurt
Kurt Ramskov

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #4by ANDREA » 02.10.2007, 09:18

kramskov wrote:....So I am looking for a way to manually pause the running script (and Celestia) for a while and then be able to reactivate the script from the point it was paused with Celestia in exactly the same state as it was paused (including the same time rate).
Regards Kurt

Kurt, I have the same problem when using my cel scripts for students.
I solved it in a bit...well, ugly way :oops: , but it works.
I know exactly where I have to pause in order to add informations, examples, reply to questions, and so on: in those script portions I wrote the timerate command again and again, let's say every 3-4 command lines, so I'm almost sure that in a very short time, or immadiately, the timerate will be the right one, even if I paused the script.
I repeat, ugly, but working.
My little cent. :wink:
Regarding the full screen command, are you using Windows?
If yes, the exact command should be --fullscreen not --full-screen.
Moreover, you must inizialize Celestia to the resolution you wish to use, the way shown here:
http://www.celestiaproject.net/forum/viewtopic ... creen+mode
in my 4th post.
Enjoy!
Bye

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

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #5by Vincent » 02.10.2007, 11:05

Kurt, Andrea,

This bug is fixed in Celestia 1.5:
http://celestiaproject.net/forum/viewtopic.php?t=8569&start=33
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #6by ANDREA » 02.10.2007, 11:12

Vincent wrote:Kurt, Andrea, This bug is fixed in Celestia 1.5:
http://celestiaproject.net/forum/viewtopic.php?t=8569&start=33

Yes Vincent, I know, but Kurt is using 1.4.1, just like me (remember... 1.5 is missing sound! :wink: ).
Bye

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

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #7by Vincent » 02.10.2007, 11:17

ANDREA wrote:Yes Vincent, I know, but Kurt is using 1.4.1, just like me (remember... 1.5 is missing sound! :wink: ).
Bye

Andrea :D

Andrea,

I would even say that 1.5 is simply missing... :wink:
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #8by ANDREA » 02.10.2007, 11:50

Vincent wrote:
ANDREA wrote:Yes Vincent, I know, but Kurt is using 1.4.1, just like me (remember... 1.5 is missing sound! :wink: ).
Bye Andrea :D
Andrea,
I would even say that 1.5 is simply missing... :wink:

Yes, I'm sorry to say it, but you are right. :cry:
It's missing!
Bye

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
kramskov M
Posts: 6
Joined: 01.01.2006
With us: 18 years 10 months
Location: Denmark

Post #9by kramskov » 03.10.2007, 21:24

Andrea, thank you for your solutions to the problems about pausing. I might use them temporarily hoping that version 1.5 will make things work better.

The problem about the full-screen mode in Windows also sounds like a bug. Maybe that will be solved also in version 1.5. Is there a more formal way to suggest such improvements? (Or maybe it is too late for version 1.5?).

Despite these irritating problems Celestia is a great program for educational purposes, because you can design your own universe emphasizing what you want especially to show. I hope to be able to upload a couple of my CEL scripts soon, so others can use them.

Kurt
Kurt Ramskov

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #10by selden » 03.10.2007, 21:36

Kurt,

Feature suggestions and bug reports should be made on Celestia's tracker pages at SourceForge. That way the developers can check them off as they're added or fixed.

Feature suggestions:
https://sourceforge.net/tracker/?group_ ... tid=371302

Bug reports:
https://sourceforge.net/tracker/?atid=1 ... unc=browse

v1.5.0 hasn't been finalized. However, there's no way to be sure which bugs will be fixed in it. Some problems may be considered too inconsequential and others too difficult to be corrected right away.
Selden

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 2 months
Location: NJ USA

Post #11by LordFerret » 04.10.2007, 03:21

I would very much like to be able to pause the script FROM THE KEYBOARD

Sorry for the misunderstanding Kurt. :oops: I'm glad to hear Andrea's suggestion has worked for you. :D


Return to “Scripting”