views:

98

answers:

2

[I'm going to be interviewed for a position, and I don't want to oversell myself...]

I can do just about anything in Objective-C (some things need a lot of code) in 2D, but I haven't actually learned any C fundamentals (except as related to Obj-C). For instance, if an Array is not an NSArray I don't know how to work with it. That said, I feel comfortable doing 2D animations in Objective-C using UIView animations or using Core Animation directly.

Without knowing C, is it possible to work in 3D (or even do 3D games) on the iPhone? I think I'm asking about OpenGL ES, but that might not be the only option...?

+2  A: 

Learning 3D graphics programming is an entirely separate issue from learning basic C. Yes, learning basic C will help you to become a better Objective-C developer, but it will not help you learn 3D programming. What is more important is that you have a good understanding of topics like 3D geometry and linear algebra.

This thread provides a great breakdown of the challenges of moving from 2D to 3D. It is geared towards making games, but many of the points covered are relevant to 3D programming in general.

Justin Ardini
+1 thanks, that helps a lot. So beyond the C issue... reading the best answer on that thread, it seems to kind of confirm my suspicion that an inexperienced 3D dev, working alone, would not be a very good bet for making a "3D Game" (no idea, let's say a driving game)...?
Yar
Offhand, I'd certainly agree with that suspicion. I personally don't know what libraries are out there for 3D Objective-C development though, a nice library could make things a bit easier.
Justin Ardini
here is a nice one http://dir.filewatcher.com/d/NetBSD/1.6.1/alpha/3DKit-0.3.1r2.tgz.143870.html but it is obviously based upon OpenGL : D
rano
@Yar - Actually, OpenGL ES is not as hard as you might think. It is difficult, yes, but one person certainly can pick up the relevant information in a reasonable time. For example, I wrote this application (for which the source code is available) in three weeks of nights and weekends: http://www.sunsetlakesoftware.com/molecules . Before I started that project, I knew little about OpenGL, and there were far fewer resources available to learn about OpenGL ES development on iPhone.
Brad Larson
@Yar - If I may plug another thing I've done, the video for the OpenGL ES class I taught as part of my advanced iPhone development course is available for free on iTunes U, along with links to my course notes on the subject: http://deimos.apple.com/WebObjects/Core.woa/Browse/matcmadison.edu.3989485784.03989485786 . You might find that helpful in coming up to speed on the topic.
Brad Larson
Thanks @Brad Larson, while it's great to have your comments here, the initial question is, "How hard would OpenGL be without knowing C?"
Yar
+1  A: 

In addition to what Justin Ardini said, I must say that 3D programming on an iPhone passes through OpenGl ES or a Graphic Engine like Irrlicht or SIO2.

Now, not knowing anything about C will make it almost impossible to accomplish: consider that OpenGL relies on C and Irrlicht and SIO2 on C++ (and C++ is derived to C even if it is not a strict superset of it like Objective-C is) as far as I know. Add to this that an array is the basic data structure (along with a struct) that C/C++ and Objective-C use.

Let me add two point on why to learn C.

  • Learning a language with supports the imperative programming paradigm is in some way useful in understanding one that supports OO. And the lowest code you can write, assembly, supports only it.
  • Objective-C as said before is a superset of C so everything written in C is legal in your obj-C code. You can understand it better and try to use it in some impressive ways (by calling the correspondent C functions sometimes for instance), and you may be able to make your code really efficient for some heavy duty tasks (and you'll find a lot in 3d programming)
rano
Thanks that helps +1. While this is all cool, it's a bit daunting. It would be a serious time investment to catch up with a skillset that I'd be a newbie in.
Yar
@Yar: as one of my teachers would say: 'if you know a programming paradigm and how to design solutions in it then you can learn a language that supports it in three days'. If a day you will mind to learn an imperative language, I suggest C. If you will learn another one, learning C will take small time. If you will try to learn logical programming paradigm I suggest Prolog : D
rano
@rano, true, but we're talking about 3D programming and the "language that supports it" all at once. That might be a few more days :)
Yar
@Yar: of course 3D programming was not counted, I was meaning: 'if you already knew an imperative language, then you could learn C in a few days'. BTW have a look at the GNU library i listed on the other answer comment
rano
@Rano, great stuff... .to hear Wikipedia tell it, just about every language I've worked in is imperative, including Ruby.
Yar
@Yar, yeas many languages comply to more than one paradigm, Ruby as far as I know, for instance, supports both imperative and oo programming. Just to be more academic, imperative and object-oriented are two paradigms that fall in the same 'approach': the operational one. (the other two are definitional and demonstrational)
rano