Skip to main content
GameDev.net gamedev.net
🔒 Locked

Painless Development on the Mac?

Started by guyver23 Dec 19, 2006 at 12:48 AM 10 replies 2.4k views
Original Post
guyver23
guyver23
Greetings. I am the happy owner of a new Macbook, and I am interested in understanding how to develop for the Mac OS X platform. I have experience in Java, C++, and some .NET stuff (Windows Forms with managed C++). I have downloaded XCode, and I must say I simply dislike everything about its style and interface. It is the first piece of Apple software that I can honestly say that about. I've looked at some samples objective-C, and it makes me sick. Is there any way to make native OS X applications in C++? Please understand that I know a lot of people do like XCode and Objective-C, but for me it just doesn't click. I know Java and Python work well on Macs, but I am most productive in C++. Thank you for your patience. I know that I am just a beginning Mac enthusiast, so I'm sorry if it seems more of a rant than a plea for help. =)
dragongame
dragongame
Hi,

I own a PowerBook and I too dislike XCode. But you can use a different IDE if you like. Like CodeBlocks. Objectiv-C is a little tricke too learn if one has a strong C++ background. But if you want to use some Mac-Libs or better Frameworks, than you might have to learn it.
Have a look at Objectiv-C++. You can use C, Objectiv-C and C++. So it would be a good start, just write your stuff in C++ and use Objective-C to just interface the mac frameworks.

Happy Coding
“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”
daviangel
daviangel
Eclipse and Java is the fastest way to go if you want to be productive right away.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
guyver23
guyver23
I know Java and just started using Ecllipse. So, essentially, you need to use that if you don't want to be stuck using Apple's Objective-C? No C++ by itself can be used? =(
gregs
gregs
For game development, I have had no real problems with XCode and Carbon for C++ work. Yes Xcode is finicky, and a huge comedown if you're used to Visual Studio + has the tendency to crash a lot, but if you're used to it, it can be more powerful than things like Code::Blocks.
Zakwayda
Zakwayda
My current project uses C++/SDL/OpenGL with no Carbon, Cocoa, or Objective-C (aside from what's under the hood at least). If your application needs to interface with OS X APIs specifically, you should be able to use Carbon with C or C++ with no problem (I think).

As for using Cocoa with C++ (no Objective-C), I'm not sure if or how that can be done, but I'm sure someone else here can point you in the right direction. You could also try idevgames.com, as there are many Mac experts on those forums.

In the end it does depend a bit on what sort of applications you're developing. For most game applications, C++/SDL/OpenGL should work just fine.
MatrixCubed
MatrixCubed
I would also suggest Code::Blocks, if only for the reason that the community is extremely active, and very friendly. I've dealt with them while working on my game in Windows and Linux (Mac OS X planned!), and I wouldn't look at another IDE.
Bregma
Bregma
Quote:
Original post by jyk
My current project uses C++/SDL/OpenGL with no Carbon, Cocoa, or Objective-C (aside from what's under the hood at least). If your application needs to interface with OS X APIs specifically, you should be able to use Carbon with C or C++ with no problem (I think).

You can use Carbon with C++, no problems. C++/SDL/OpenGL is even better, because it will also run on Linux and Windows.
Quote:

As for using Cocoa with C++ (no Objective-C), I'm not sure if or how that can be done...

Um, well, Cocoa is an Objective-C library. You either have to use if from Objective-C, Objective-C++, or Java. You'll find Objective-C++ is just like Objective-C only with C++ classes and templates and the standard library thrown in. You get used to it.
Quote:

In the end it does depend a bit on what sort of applications you're developing. For most game applications, C++/SDL/OpenGL should work just fine.

I second that.

By the way, vim and the GNU autotools work just as well on Mac OS X as they do on Linux and Windows/CygWIN/MinGW. And BSD, Solaris, embedded, IBM mainframes, or wherever else you want to develop games. One tool to generate bundles, dlls, or whatever.

--smw

Stephen M. Webb
Professional Free Software Developer
etothex
etothex
Just like in any *nix you can always fire up a terminal and run Emacs and GCC from the command line and program straight C++ - you can use Apple's Carbon libraries, or a cross-platform kit like SDL, wxWindows, etc.

Alternatively, there are lots of good C++ IDE - eclipse, code::blocks, and so on.

Xcode isn't too bad, but I totally get what you're saying. It is not intuitive _at all_ as to how to do even simple things or where things are located.
guyver23
guyver23
Thank you all for your replies. Here is what I understand (please bear with me, I'm new at this)
1. I can use cross-platform libraries like wxWidgets and SDL just like I would under Windows.
2. I can use carbon and C++.

What is Carbon and C++? I've read about it but I find it a bit confusing. Thank you! ^_^
daviangel
daviangel
Quote:
Original post by guyver23
Thank you all for your replies. Here is what I understand (please bear with me, I'm new at this)
1. I can use cross-platform libraries like wxWidgets and SDL just like I would under Windows.
2. I can use carbon and C++.

What is Carbon and C++? I've read about it but I find it a bit confusing. Thank you! ^_^


It's what you'll be using if you want your mac apps to run as fast as possible!
"Carbon is a set of APIs for developing full-featured, high-performance, and reliable applications for Mac OS X. Carbon enables C, Objective-C and C++ developers to take advantage of Mac OS X-specific features, including an advanced user interface toolkit, an efficient event-handling mechanism, the Quartz 2D graphics library, and multiprocessing support. In addition, other industry-standard C and C++ APIs are easily available to Carbon developers, providing access to such services as the OpenGL drawing system, the Mach microkernel, and BSD operating-system services, and even the Cocoa framework. And you can use virtually any Macintosh development environment that supports Intel and PowerPC to build Carbon applications"

[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
MARS_999
MARS_999
You can code C++ in Cocoa. Rename the file to .mm IIRC??? Only ObjC or Cocoa you have to deal with is the setup and after that you are pure C++ if you want. Tell you the truth ObjC with Cocoa for apps kicks the crap out of MFC/Win32 anyday. I made a OpenGL map editor in like 2 days tops with Cocoa and ObjC. So if you want Xplatform use SDL and C++, with OpenGL. SDL under the hood uses ObjC/Cocoa. I to didn't like Xcode after using MSVC for so many years it's hard to use Xcode IMO. Good luck.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.