Help me please!!!

I want to make 3d games on a mac.
i have experience in BASIC… a long time ago.
anyway, i want to use OpenGL but i dont know if i should learn Cocoa or Carbon or what the difference is.

What language should i learn if i want to use OpenGL to its fullest + have the most programming power?

I also heard of RealBASIC - but it doesnt utilize 3d OpenGL , right?

i also heard about Panther? can that do OpenGL 3D?
Could I just use X-code??
what language should i learn!! Help!!

Real Basic actually has some 3d capabilities, which actually use OpenGL (through a library called Quesa or something…). You might be able to do well with Real Basic.

Panther is OSX 10.3, and it includes OpenGL like the previous versions of OSX. Xcode is an IDE for Panther that lets you write programs in languages like C, C++, Objective-C, Java, and even some others. The choice between Carbon and Cocoa depends mostly on what language you want to use. If you want to use C++ then you should probably use Carbon, or if you want to use Objective-C then you should probably use Cocoa.

I have a good amount of experience with C, C++, and a little Objective-C, and I’m still having trouble picking up OpenGL. Perhaps I’m just not trying hard enough, but I just keep hitting road blocks with OpenGL. Right now I want to try and focus on learning the CG (Core Graphics) / Quartz graphics library, which is for 2D purposes.

If you want to jump into 3D graphics pretty quickly, you might have a chance with Real Basic. If you want to work more directly with OpenGL then your best bet would be to learn C++ or Objective-C first. My recommendation would be to go to your local library or giant book store and pick up a book on one of those languages… however it may be hard to find a good book for learning Objective-C. I like the Sams “Teach Yourself {language here} in 21 days” books.

Now if you want to write games, it would be a really good idea to start out with something really simple, 2D graphics for instance. Get used to drawing, timing, player interaction, and basic game physics by doing a small 2D game. It’s best to get used to some of the basic problems you’ll encounter before you start adding more complex issues into your program. My recommendation would be to create a pong game or something… it can be harder than it seems.

Everything Seth wrote is correct.

But keep in mind that OpenGL is a C-based API. You should really learn C if you want to be able to use OpenGL to its fullest (in multiple environments later on, for example.)

So it doesn’t matter if you learn Carbon (C, C++) or Cocoa (Objective-C) since either can use OpenGL fully. But, if you are starting out, I recommend Cocoa. It is a newer API and will take care of a lot of application details automatically. You will still need to learn C first.

After learning C, try the NeHe OpenGL tutorials (many of which have ports for OS X) or dropping by where there are many people who have gone through exactly what you are doing now, and can give you detailed advice.

You will still need to learn C first.

I just wanted to comment on the idea that it’s necessary to learn c before c++. That’s like saying that you need to learn to play the banjo before you learn to play the guitar. You spend a year learning c, then the next 4 years trying to break all the habbits you learned in order to adopt a different philosophy. If you’re planning on learning c++, then I suggest starting with c++.

I was emphasizing C before Cocoa/Obj-C. But I sort of agree with you anyway. Only sort of, because both C++ and Obj-C’s OO-ness lead to different design patterns and coding habits than you would have in plain C, so you are right to just focus on that since it will be what you end up doing. But at the same time, a lot of the C++ (and particularly) Obj-C textbooks I’ve seen focus exclusively on the OO portion, assuming the reader already knows C. I think it is to any programmer’s benefit to go ahead and learn as many languages as possible. Certainly in the case of Obj-C it is only a handful of extra syntax to grok after learning C.

You make a good point, and I agree with you.
My, it sure is roomy over here. :wink:

I would love to help you get started with Gizmo3D. If you think c++ is a great language, and you want really high performance 3D graphics, our scene graph is really a great way to program openGL on Mac. You can use bot low level opengl calls as well as advanced techniqes for massive 3D visualisation using Gizmo3D with shadows, shaders etc…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.