When one has divided Celestia's Window into multiple viewpanes, it'd be nice to be able to run a different asynchronous script associated with each viewpane.
It'd also be nice to be able to run a script that can interact with all of the open viewpanes.
This suggests to me that there needs to be some way to specify which viewpane all subsequent commands should apply to.
Being able to create and destroy named viewpanes from within a script might be one solution, perhaps.
Feature Request: separate scripts for separate viewpanes
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 10 months
- Location: Seattle, Washington, USA
As you may have seen, there's been some discussion about very closely related issues on the developers list.
I don't have any plans to continue development on the old Celestia script system. You'll still be able to run old scripts, but there won't be any new commands added. The focus has switched to making scripting with Lua as powerful as possible.
I'm not sure that allowing multiple scripts to run simultaneously is such a good idea. It seems better to let a single script control all views. A script would be allowed to do whatever it wanted in the different views, but the user would only be permitted to run one script at a time. Is there a scenario you can envision where running two scripts simultaneously would be useful? Or rather, is there a scenario in which the same thing would not be better accomplished by running one script that manages two or more views itself?
--Chris
I don't have any plans to continue development on the old Celestia script system. You'll still be able to run old scripts, but there won't be any new commands added. The focus has switched to making scripting with Lua as powerful as possible.
I'm not sure that allowing multiple scripts to run simultaneously is such a good idea. It seems better to let a single script control all views. A script would be allowed to do whatever it wanted in the different views, but the user would only be permitted to run one script at a time. Is there a scenario you can envision where running two scripts simultaneously would be useful? Or rather, is there a scenario in which the same thing would not be better accomplished by running one script that manages two or more views itself?
--Chris
-
Topic authorselden
- Developer
- Posts: 10192
- Joined: 04.09.2002
- With us: 22 years 3 months
- Location: NY, USA
Chris,
Well, if the scripting language supports multi-threading, I suppose that would work just as well
I'm thinking about how one might try to demonstrate sequences of events in different viewpanes that take different amounts of time to complete -- like demonstrating how much longer it takes to get to Jupiter compared to Mars. (that's just a trivial case that I came up with for the sake of discussion.) Or maybe displaying alternate routes to get to the same destination using different gravity assists.
If one can write a script containing multiple routines (threads?) and associate different routines with different viewpanes, that'd be just as good as multiple scripts, I suspect. The ability to do something like "wait for all routines to finish" or "wait for a specified routine to finish" would be needed, I think -- or, more generally, the ability to set, clear and wait-for some logical combination of event flags.
Does this make sense?
Well, if the scripting language supports multi-threading, I suppose that would work just as well
I'm thinking about how one might try to demonstrate sequences of events in different viewpanes that take different amounts of time to complete -- like demonstrating how much longer it takes to get to Jupiter compared to Mars. (that's just a trivial case that I came up with for the sake of discussion.) Or maybe displaying alternate routes to get to the same destination using different gravity assists.
If one can write a script containing multiple routines (threads?) and associate different routines with different viewpanes, that'd be just as good as multiple scripts, I suspect. The ability to do something like "wait for all routines to finish" or "wait for a specified routine to finish" would be needed, I think -- or, more generally, the ability to set, clear and wait-for some logical combination of event flags.
Does this make sense?
Selden