Celestia OS X Status Report
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
Celestia OS X Status Report
done
ProjectBuilder project for Celestia
CoreGraphics JPEG texture loading (no libjpeg dependency)
Fixed all compiling issues with 1.2.4
in progress
Objective C++ wrappers for CelestiaCore, FavoritesList, etc.
- CelestiaCore is entirely wrapped, but none of the secondary and tertiary class wrappers are finished yet
Interface Builder templates for all the windows
- I've done the main window, the menubar, and the Goto Location panel so far
I have to map all the keyboard/mouse/menu/window actions to CelestiaAppCore (the ObjC wrapper for CelestiaCore), but they all should work!
todo
QuickTime PNG texture loading (to remove libpng dependency)
Internationalization (I'll need help with this one, I'm not fluent in anything but english and code ;)
QuickTime movie capture (mov)
CoreGraphics still capture (png, jpg)
Smarter texture handling based upon capabilities of the graphics card
Joystick support (does anyone want this? I don't have a joystick...)
Fullscreen support (NSOpenGLContext makes this pretty easy!)
AppleScript support (So you can script it from the outside if you want to)
---
Basically we're looking at another one to three weeks and I'll have it up to par with the win32 version and ready for release.
The lowend machine I'm targetting is a powerbook g4 with an ATI Radeon Mobile w/ 16meg as that's the lowest I'm testing with. After this release I'll spend more time worrying about people with older macs.
As a side note, this could probably be made into a GNUStep interface as well, eventually.. though I think the Objective C++ support on non-osx platforms is lacking, at least, that's what I've heard. I don't use linux or freebsd as a desktop anymore so I can't really say.
ProjectBuilder project for Celestia
CoreGraphics JPEG texture loading (no libjpeg dependency)
Fixed all compiling issues with 1.2.4
in progress
Objective C++ wrappers for CelestiaCore, FavoritesList, etc.
- CelestiaCore is entirely wrapped, but none of the secondary and tertiary class wrappers are finished yet
Interface Builder templates for all the windows
- I've done the main window, the menubar, and the Goto Location panel so far
I have to map all the keyboard/mouse/menu/window actions to CelestiaAppCore (the ObjC wrapper for CelestiaCore), but they all should work!
todo
QuickTime PNG texture loading (to remove libpng dependency)
Internationalization (I'll need help with this one, I'm not fluent in anything but english and code ;)
QuickTime movie capture (mov)
CoreGraphics still capture (png, jpg)
Smarter texture handling based upon capabilities of the graphics card
Joystick support (does anyone want this? I don't have a joystick...)
Fullscreen support (NSOpenGLContext makes this pretty easy!)
AppleScript support (So you can script it from the outside if you want to)
---
Basically we're looking at another one to three weeks and I'll have it up to par with the win32 version and ready for release.
The lowend machine I'm targetting is a powerbook g4 with an ATI Radeon Mobile w/ 16meg as that's the lowest I'm testing with. After this release I'll spend more time worrying about people with older macs.
As a side note, this could probably be made into a GNUStep interface as well, eventually.. though I think the Objective C++ support on non-osx platforms is lacking, at least, that's what I've heard. I don't use linux or freebsd as a desktop anymore so I can't really say.
Excellent !
This is really great news !! I look forward to the new version with great anticipation.
great news!
i've got all sorts of UI-related things i'd like to try doing with Celestia (mmm... QuartzExtreme...), but the current state of the source (and makefile build system) has just been too much a barrier to entry for me to play with it in my free time.
BTW, are you sure you need to use QuickTime API to load PNG textures? I'm not sure just how the cross-platform GL part of Celestia wants the pixmap data, but Cocoa's NSImage might be a lot easier to use.
i've got all sorts of UI-related things i'd like to try doing with Celestia (mmm... QuartzExtreme...), but the current state of the source (and makefile build system) has just been too much a barrier to entry for me to play with it in my free time.
BTW, are you sure you need to use QuickTime API to load PNG textures? I'm not sure just how the cross-platform GL part of Celestia wants the pixmap data, but Cocoa's NSImage might be a lot easier to use.
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
A little taste
QuartzExtreme isn't going to do much for Celestia, since it's already using OpenGL.. It might actually hurt it more than it would help.
The texture stuff is part of the Celestia C++ core, so I'm not using any Objective C (that rules out NSImage).. In any case, NSImage actually uses the Quicktime API to represent many of its image types, because CoreGraphics doesn't understand PNGs by itself.
I don't recommend screwing with the Celestia source as far as OS X goes until I'm done with this, because I've been working on a completely new Objective C interface using Objective C++ wrappers and a lot of category tricks to hide the C++ implementation.. you will be able to control all of celestia with plain old Objective C, which is what OS X developers need. It's a lot of work, but it'll be worth it.
The interface code looks a lot like this:
NSLog(@"-[GotoWindowController gotoObject:%@]",sender);
sim = [[CelestiaAppCore sharedAppCore] simulation];
NSLog(@"[objectField stringValue] = '%@'",[objectField stringValue]);
if ([[objectField stringValue] length])
csel = [sim findObjectFromPath:[objectField stringValue]];
if ((csel == nil) || [[csel empty] boolValue])
return;
[sim setSelection:csel];
[sim geosynchronousFollow];
And the wrapper is built using *only* Objective C types (NSNumber, etc) so it will be entirely and easily scriptable with anything that can speak to Objective C.
Sounds very cool... I'll be anxious to start working with that ObjC interface. Is that in the 1.2.4 port you're working on now, or for after?
As for what QuartzExtreme could do for Celestia... watch Session 503 from WWDC (dunno if you attended or if non-attendees have ADC TV access yet), and you might be similarly inspired.
Good luck with the QT PNG loading... that's not the most fun code I've ever played with.
-- Rick @ Omni, who's too lazy to get an account
As for what QuartzExtreme could do for Celestia... watch Session 503 from WWDC (dunno if you attended or if non-attendees have ADC TV access yet), and you might be similarly inspired.
Good luck with the QT PNG loading... that's not the most fun code I've ever played with.
-- Rick @ Omni, who's too lazy to get an account
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
It's the 1.2.4 port I'm working on, but I'm going to want to sync it with CVS after it's done.
Unfortunately I didn't go to WWDC nor do I have ADC TV access (there's a menu option, but nothing after I click it.. perhaps because I'm a free ADC member)
It's actually not so bad, I've come up with a pretty good system of doing things using classes with embedded NSValue (for celestia classes passed by reference), NSMutableData (for celestia classes/structs passed directly) and subclasses of NSMutableArray (for STL vectors and stuff).. Private categories for the classes that have access to all the C++ stuff, where the public interfaces only have Obj C compliant things in them (i.e. a category on NSString that lets it go back and forth from std::string). It's definitely a lot of work, I've done about 3kloc of uncommented objc/objc++/c++ code on the port, but everything has just about fallen into place.. a few more classes to wrap and I'll have nearly a complete interface to everything accessible from the core... but I'm going to start working more on the UI before I get back to that... I might even have enough wrapped to do the entire UI.
I'm actually thinking that maybe CelestiaCore should be made into a framework... so you could write other Cocoa apps that use Celestia's engine, like maybe ssc editors, model previewers, etc?
Unfortunately I didn't go to WWDC nor do I have ADC TV access (there's a menu option, but nothing after I click it.. perhaps because I'm a free ADC member)
It's actually not so bad, I've come up with a pretty good system of doing things using classes with embedded NSValue (for celestia classes passed by reference), NSMutableData (for celestia classes/structs passed directly) and subclasses of NSMutableArray (for STL vectors and stuff).. Private categories for the classes that have access to all the C++ stuff, where the public interfaces only have Obj C compliant things in them (i.e. a category on NSString that lets it go back and forth from std::string). It's definitely a lot of work, I've done about 3kloc of uncommented objc/objc++/c++ code on the port, but everything has just about fallen into place.. a few more classes to wrap and I'll have nearly a complete interface to everything accessible from the core... but I'm going to start working more on the UI before I get back to that... I might even have enough wrapped to do the entire UI.
I'm actually thinking that maybe CelestiaCore should be made into a framework... so you could write other Cocoa apps that use Celestia's engine, like maybe ssc editors, model previewers, etc?
CVS
When does thing get into CVS? I'm worried that nothing os the OSX port ever went into the repository. So theres no way to keep on top of the development on OSX at all.
Maybe chris could make etrepum a read-write access to the repository, else we'll never be able to sync.
Say, you finish the cocoa bits, then you cant check it in because it's not 'up to date' but while you do that, the repository evolves, so you no longer are 'up to date' etc etc.
Thats what as been going on since 1.2, and the result is that only you have been able to build it :oops:
I'm not criticizing, you are doing a super job, but maybe theres a couple more people who would *really* want to contribute and play :P
Maybe chris could make etrepum a read-write access to the repository, else we'll never be able to sync.
Say, you finish the cocoa bits, then you cant check it in because it's not 'up to date' but while you do that, the repository evolves, so you no longer are 'up to date' etc etc.
Thats what as been going on since 1.2, and the result is that only you have been able to build it :oops:
I'm not criticizing, you are doing a super job, but maybe theres a couple more people who would *really* want to contribute and play :P
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
I have read/write access to the repository these days, I think. I'll sync it up when it's ready to sync up, my codebase is too volatile and untested to unleash on the unsuspecting public :) It'd slow things down if other people were working on my code when files are being created and destroyed on a daily basis.. It's starting to solidify though, so it won't be more than two weeks or so until I'm happy enough with it for a sync (once I've figured out the API I want to use for everything) and possible release.
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Wow . . . what a lot of work! I really wish that Apple would have gone with C++ instead of Objective C. Whatever the arguments for using Objective C, I think the vast amount of C++ code and expertise is a good enough argument for building libraries based on C++.etrepum wrote:It's the 1.2.4 port I'm working on, but I'm going to want to sync it with CVS after it's done.
Unfortunately I didn't go to WWDC nor do I have ADC TV access (there's a menu option, but nothing after I click it.. perhaps because I'm a free ADC member)
It's actually not so bad, I've come up with a pretty good system of doing things using classes with embedded NSValue (for celestia classes passed by reference), NSMutableData (for celestia classes/structs passed directly) and subclasses of NSMutableArray (for STL vectors and stuff).. Private categories for the classes that have access to all the C++ stuff, where the public interfaces only have Obj C compliant things in them (i.e. a category on NSString that lets it go back and forth from std::string). It's definitely a lot of work, I've done about 3kloc of uncommented objc/objc++/c++ code on the port, but everything has just about fallen into place.. a few more classes to wrap and I'll have nearly a complete interface to everything accessible from the core... but I'm going to start working more on the UI before I get back to that... I might even have enough wrapped to do the entire UI.
I'm actually thinking that maybe CelestiaCore should be made into a framework... so you could write other Cocoa apps that use Celestia's engine, like maybe ssc editors, model previewers, etc?
That would be pretty useful . . . I've thought myself that one obvious application for the Celestia libraries would be a ssc editor.
--Chris
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
chris wrote:Wow . . . what a lot of work! I really wish that Apple would have gone with C++ instead of Objective C. Whatever the arguments for using Objective C, I think the vast amount of C++ code and expertise is a good enough argument for building libraries based on C++.etrepum wrote:It's the 1.2.4 port I'm working on, but I'm going to want to sync it with CVS after it's done.
Unfortunately I didn't go to WWDC nor do I have ADC TV access (there's a menu option, but nothing after I click it.. perhaps because I'm a free ADC member)
It's actually not so bad, I've come up with a pretty good system of doing things using classes with embedded NSValue (for celestia classes passed by reference), NSMutableData (for celestia classes/structs passed directly) and subclasses of NSMutableArray (for STL vectors and stuff).. Private categories for the classes that have access to all the C++ stuff, where the public interfaces only have Obj C compliant things in them (i.e. a category on NSString that lets it go back and forth from std::string). It's definitely a lot of work, I've done about 3kloc of uncommented objc/objc++/c++ code on the port, but everything has just about fallen into place.. a few more classes to wrap and I'll have nearly a complete interface to everything accessible from the core... but I'm going to start working more on the UI before I get back to that... I might even have enough wrapped to do the entire UI.That would be pretty useful . . . I've thought myself that one obvious application for the Celestia libraries would be a ssc editor.I'm actually thinking that maybe CelestiaCore should be made into a framework... so you could write other Cocoa apps that use Celestia's engine, like maybe ssc editors, model previewers, etc?
--Chris
Well you can use C++ freely with the semi-recently (December 2001) introduced development tools with Objective C++, which is what all the wrappers are based on. The benefits of objective c are primarily dynamism (more or less, dynamic run-time typing) and reference counting garbage collection. Both are pretty good stuff, I'm quite fond of them myself. The STL is good stuff though, I miss it at times, but the Objective C foundation classes simplify *everything* so completely they're hard to pass up.. from serialization to distributed objects to clustered computing. Though it's possible and not too difficult to do it in C++ it's easier to deal with when the classes you're using already do it.
The biggest bonus to Apple's development environment is Interface Builder. I think once you start using it you'll find it hard to go back, especially with a fully Objective C API like the one I'm putting together :)
Wow . . . what a lot of work! I really wish that Apple would have gone with C++ instead of Objective C. Whatever the arguments for using Objective C, I think the vast amount of C++ code and expertise is a good enough argument for building libraries based on C++.
Clearly you have yet to be sold on Cocoa. Don't worry, we'll indoctrinate you yet.
Dynamism, dynamism, dynamism. With Cocoa/ObjC, you really can do more with less code. Interface Builder may not look all that special in this age of Visual This-and-that, but it is: there's no byzantine, bloated COM trickery behind the scenes helping you turn some interface definition into real code.
When we ported Oni to Mac OS X, we replaced 18,000 lines of file management code with 800. OmniWeb is around 300,000 (almost half of which is other people's plain-C, like the PNG library and JavaScript runtime), compared to 1.5 million for Mozilla.
--Rick
(P.S... I signed up as Rickster but can't log in. I get "phpBB : Critical Error Couldn't open celestia template config file". Maybe because I picked the "dark" option?)
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
You don't need to convince me of the advantages of dynamism--I spent three years programming almost exclusively in Java. I wish that I could use Java's standard thread, XML, http, image, and UI libraries in Celestia. Garbage collection, robust exception handling, and dynamic casting would be wonderful (C++ does have some support for the latter . . .). However, Java doesn't allow creation of objects on the stack, templates, or operator overloading. While the latter is just syntactic sugar, it greatly clarifies all the vector math in Celestia. Objective C might be great language for Celestia if it wasn't a Mac OS X only language (I know there's a gcc frontend, but that's not enough . . .) C# looks promising too, but it's useless for Celestia until there are solid implementations on platforms other than Windows. At this point, I guess I'm just glad that at least decent C++ compilers are available so that I'm not just stuck with C (I'm sure this statement will generate some controversy ) Anyhow, that's how I see the language situation . . .Anonymous wrote:Clearly you have yet to be sold on Cocoa. Don't worry, we'll indoctrinate you yet.
Dynamism, dynamism, dynamism. With Cocoa/ObjC, you really can do more with less code. Interface Builder may not look all that special in this age of Visual This-and-that, but it is: there's no byzantine, bloated COM trickery behind the scenes helping you turn some interface definition into real code.
Oni? So do you work for Bungie?When we ported Oni to Mac OS X, we replaced 18,000 lines of file management code with 800. OmniWeb is around 300,000 (almost half of which is other people's plain-C, like the PNG library and JavaScript runtime), compared to 1.5 million for Mozilla.
(P.S... I signed up as Rickster but can't log in. I get "phpBB : Critical Error Couldn't open celestia template config file". Maybe because I picked the "dark" option?)
I tried to add a new template and screwed it up . . . I fixed the Rickster account and removed the dark template so that no one else will hit this problem.
--Chris
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
Favorites..
Well I've got the favorites stuff working, in a menu. It doesn't let you organize them yet, that's coming with a NSDrawer/NSOutlineView (a la bookmarks in omniweb). It still (very temporarily really) has the limitation of the C++ version in that you can only have one folder deep, but I'm just going to make a separate implementation that allows "infinite" folder depth and such because it really should.
I don't have UniversalCoord totally wrapped yet because I haven't wrapped BigFix.. I'm thinking I might have to do it with some sort of NSNumber subclass or something, which would be alright I guess, NSNumber doesn't natively support anything with more precision than double, which is kinda unfortunate... but once that's done, they should be totally serializable from the ObjC world.
I guess I should probably get around to actually activating all the keyboard/mouse stuff too.. though, it's not so bad navigating by name with the go to locations thing ;)
I don't have UniversalCoord totally wrapped yet because I haven't wrapped BigFix.. I'm thinking I might have to do it with some sort of NSNumber subclass or something, which would be alright I guess, NSNumber doesn't natively support anything with more precision than double, which is kinda unfortunate... but once that's done, they should be totally serializable from the ObjC world.
I guess I should probably get around to actually activating all the keyboard/mouse stuff too.. though, it's not so bad navigating by name with the go to locations thing ;)
OK, account works now. Thanks!
True, true. Part of the problem is the fact that Cocoa and ObjC are so closely tied -- there's really not much of an ObjC as we know it without Foundation, and that's Apple's, even if your compiler knows the language. Maybe someday...
Anyhow, Cocoa's a great framework for writing apps, if not space simulator engines, so it's great to see Bob's work making it mre easily possible to turn the Celestia engine into cool applications. Can't wait to get my hands on it! :)
No, I work for The Omni Group, a small Mac OS X software company in Seattle. We did an official OS X port of Oni early last year -- the release version was Carbonized against Mac OS X Public Beta and didn't really work at all on 10.0+, and the code was sort of "orphaned" by the whole Bungie/Microsoft/GoD thing.
Yeah, that's one of few features I'm ever wishing ObjC had. On the one hand, it's great for when you're defining mathematical objects (you've got BigFix, my father-in-law the stats professor does probability curves). On the other hand, it gets so abused: when I use such-and-such class, is "+" going to sum, concatenate, or do something entirely else?chris wrote:...operator overloading. While the latter is just syntactic sugar, it greatly clarifies all the vector math in Celestia.
chris wrote:Objective C might be great language for Celestia if it wasn't a Mac OS X only language (I know there's a gcc frontend, but that's not enough . . .)
True, true. Part of the problem is the fact that Cocoa and ObjC are so closely tied -- there's really not much of an ObjC as we know it without Foundation, and that's Apple's, even if your compiler knows the language. Maybe someday...
Anyhow, Cocoa's a great framework for writing apps, if not space simulator engines, so it's great to see Bob's work making it mre easily possible to turn the Celestia engine into cool applications. Can't wait to get my hands on it! :)
chris wrote:Oni? So do you work for Bungie?
No, I work for The Omni Group, a small Mac OS X software company in Seattle. We did an official OS X port of Oni early last year -- the release version was Carbonized against Mac OS X Public Beta and didn't really work at all on 10.0+, and the code was sort of "orphaned" by the whole Bungie/Microsoft/GoD thing.
-
- Posts: 408
- Joined: 27.03.2002
- With us: 22 years 7 months
- Location: Leiden, The Netherlands
localizing...
As I probably stated somewhere before, I'm willing to localize Celestia for OS X for the Netherlands and Flandres (dutch).
So as soon as there is a finalized port, you'll hear from me again.
So as soon as there is a finalized port, you'll hear from me again.
Lapinism matters!
http://settuno.com/
http://settuno.com/
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
More progress
Favorites are pretty solid, just need to add folders, dragging, and persistence to that NSOutlineView subclass. Might decide to parse the julian date as a real date w/ timezone also.
-
Topic authoretrepum
- Developer
- Posts: 29
- Joined: 29.05.2002
- With us: 22 years 5 months
- Location: New York, NY
- Contact:
CVS merge
I merged everything I have so far with the CVS, which affected pieces of the core.. so hopefully I didn't break anything for non-OSX users.
It's not in any way ready for general consumption, so don't play with it unless you're interested in how I've wrapped the celestia classes or something like that.
It's not in any way ready for general consumption, so don't play with it unless you're interested in how I've wrapped the celestia classes or something like that.