Celestia Control

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
HankR

Celestia Control

Post #1by HankR » 15.08.2002, 01:50

I want to follow up here on an idea from the "Java version?" thread, not really about Java but rather the problem of cross-platform GUI development.

Suppose that the Celestia core (i.e. excluding the GUI) were encapsulated in a command language interface. In other words, the Celestia core functionality would be controlled completely using command strings. Thus for example, in the GUI (on any platform), pressing the 'L' key (to make time go faster) would simply send the string "time.rate *= 10.0" (or something like that) to the Celestia command language interpreter. All other Celestia functions would be controlled in a similar way.

Once this were in place, it would be possible to design the GUI (on each platform) to load its key definitions from a file. The key definition format might be something like "keydef L : time.rate *= 10.0". Such key definition files could be essentially platform-independent. New key commands could easily be added without any recoding of the GUI. Also, users could use the same mechanism to customize key definitions to their personal tastes.

Such a scheme could also be used to provide cross-platform menu definition files. The definition file would specify the label string for the menu item and the command string to be sent to the Celestia command interpreter when the item was selected. The GUI would read the definition file and build the menus and send the commands as specified therein. Again, new menu commands could be added without modifying the GUI, and users could customize their menus as they choose.

It is conceivable that a similar command-based cross-platform definition file approach could be used for browsers and other GUI features as well.

The command specification would not be limited to single commands, but could include elaborate command sequences (including conditionals, etc.) These could also be used as script files, of course, invoked by filename. In addition, scripts could be created via live recording simply by capturing the command strings as they are received by the command interpreter.

And since the command interpreter simply receives a command string as input and returns a result string as output, it could easily be integrated in almost any GUI environment.

Just a thought.

- Hank

billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #2by billybob884 » 23.08.2002, 00:24

I really dont see why a java version of celestia would be needed. Chris talked about this in another post and made a very good point as to why opengl is a better choice


Mike M. :?
Mike M.

TacoTopia!

Topic author
HankR

Post #3by HankR » 23.08.2002, 00:48

The idea discussed above has nothing to do with Java. That's why I put it here instead of on the thread with the Java discussion.

BTW, OpenGL can be used with Java via a JNI interface. The issue on the other thread was actually Java vs. C++, not Java vs. OpenGL.

billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #4by billybob884 » 23.08.2002, 00:55

Sorry, my bad! :oops:


Mike M. :mrgreen:
Mike M.



TacoTopia!


Return to “Development”