reasons to go w/ cocoa/obj-c

Tzuriel
Unregistered
 
Post: #1
Hey all,

I've got a new project underway and I'm trying to decide on languages. I really like the Cocoa interfaces and I'm thinking when OS X goes intel next year, that's going to open up many new possible customers for my app.

The problem is, I can't really find a good reason to go with Cocoa/Obj-C (other than it looks nice) because there are many other portable GUI API's that can offer something comparable and run on OS X as well as other platforms.

So I'm hoping there's something I'm overlooking. I say that because I have a big thing for really nice looking interfaces and Aqua is. I also like XCode, getting really used to it. It's a love hate relationship.

I'm big on Java, but from what I understand, Apple stopped at 1.4 with GUI controls and I get things like drawers and sheets in Cocoa that I really like that I can't get w/ Java apps, besides, I'd be using a 1.5 vm if I did and that breaks on OS X. What else will I gain by using Cocoa besides new controls, I've only been working with it for a short amount of time. I guess I just need reasons that will outweight the possibility of moving to other platforms, something that will do things I can't do on other platforms w/ other API's ... or something like that. I kind of think I'm choosing Cocoa/Obj-C just because I like it (it's pretty) even though I have no current plans to run on other platforms. Letting my feelings choose isn't a good idea.

Anyone got anything to say on this point about choosing Cocoa as a language for a project other than "do it since your writing for OS X" ... advice, comments, etc...?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
If you want your application to look and feel like a Mac app, you have two choices -- Carbon and a whole heck of a lot of tedious work, or Cocoa. None of the cross-platform GUI toolkits manage to create Mac-like apps at all.

If you don't care about how it looks and feels on the Mac, go ahead and use whatever technology you're most enamored with.
Quote this message in a reply
Member
Posts: 129
Joined: 2005.02
Post: #3
I'm a big fan of games having their own GUI (versus cop-out interfaces that rely on some Aqua). This isn't to say they should use their own windowing system or anything like that. I think the menu bar, the window(s), and an about box is suffice.

I'm a huge Cocoa fan, and you can definitely abstract the abovementioned into their own Objective-C++ objects, and then have the ability to code the rest of your game in the great C++. I've done a lot of this sort lately and absolutely love it. And lets face it. If you want portability, you'll definitely be eyeballing C++, and you'd want to abstract your OS functionality as much as possible.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #4
I'm a not so huge fan of games with their own GUI. I've seen many a game that was very good, but had a terribly screwed up GUI where standard interface elements would have done the trick (think settings, etc).

Note that you can subclass all the buttons etc to match your look & feel if necessary.

Lately, I'm not such a huge fan of C++ either, especially if you can go with ObjC anyway Rasp
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #5
C++ is a very nice language, and I'd go as far to say that it's better than Objective C in terms of power. Things such as operator overloading, templates, and objects that reside on the stack are among the top of reasons. Not to mention the portability. However, in order to easily get your GUI, Objective C is definitely the way to go. What I've done is do all my GUI portion in Objective C, but do the core of my program in C++, and it works just fine.
Quote this message in a reply
Member
Posts: 129
Joined: 2005.02
Post: #6
Definitely a diehard fan of C++. My university recently went to all-Java, and I hate it. Oh well. You only go for the degree... right? Smile Anyway, I think C++ is way more flexible than ObjC. Esp if you ever want to port your game to another platform. And who said you can't wrap your ObjC/Cocoa GUI around a universal C++ platform-specific class?
Quote this message in a reply
Tyler
Unregistered
 
Post: #7
Hello, I'm a newbie and want to fool a little around with game programming to learn Objective-C. But the SDL-Homepage links to the sdlobjc Project, which is a dead end. Hu?

Does this mean I can only use C/C++ with SDL?
Or does this only relate to Linux and I simply can't port my code?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
You can use ObjC with SDL (the Mac version of SDL is written in ObjC, after all), but you don't have to...
Quote this message in a reply
Member
Posts: 63
Joined: 2005.04
Post: #9
"My university recently went to all-Java"

my condolences
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #10
My university also recently went all-java. (fortunately there are a few courses that hold out in a non-java environment) Fortunately most of my programming isn't for class.
Quote this message in a reply
Post Reply