★ TouchArcade needs your help. Click here to support us on Patreon.

Objective C or C++ ...& OpenGL ES

09-18-2010, 07:57 AM
#1
Joined: Sep 2010
Location: Atlanta
Posts: 184
Objective C or C++ ...& OpenGL ES

So i've been learning Open GL ES for the past couple of months, and the book i've been following uses Objective C (which i'm quite proficient in). However, I've looked at some other books that typically use C++(which i'm decent in), and read a statement by the Pocket God people of them switching from Objective C to C++

I just wanted to know what do you guys prefer or what is recommended when developing iOS games with Open GL ES?

I've been leaning more toward C++ as of late as it seems like the language of choice my game developers and it's a tad lower level than Objective C, even though i'm more familiar with ObjC.

Thanks all!
09-18-2010, 08:47 AM
#2
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
If you're already familiar with Objective-C and don't plan to develop for other platforms there's no reason to switch. It will certainly make it easier for you to get stuff "for free" through Apple's API's.

If however you'd like to move your projects to other platforms as well it might make sense to go down the C++ route as it has a much wider support...

09-18-2010, 09:05 AM
#3
Joined: May 2009
Location: UK
Posts: 741
Quote:
Originally Posted by pchukwura View Post
So i've been learning Open GL ES for the past couple of months, and the book i've been following uses Objective C (which i'm quite proficient in). However, I've looked at some other books that typically use C++(which i'm decent in), and read a statement by the Pocket God people of them switching from Objective C to C++

I just wanted to know what do you guys prefer or what is recommended when developing iOS games with Open GL ES?

I've been leaning more toward C++ as of late as it seems like the language of choice my game developers and it's a tad lower level than Objective C, even though i'm more familiar with ObjC.

Thanks all!
OpenGL is of course a C API which means you can use it from either. Personally, I'd always choose C++ and keep the use of Objective C to a minimum.This is vital to me because portability and being able to work with programmers who know even less Objective C than I do is important. I know at least ten times as many C++ programmers as objective C.

-=< Fat Owl With A Jetpack >=-
-=< Topia World Builder >=-
-=< Twitter >=-
-=< Blog >=-
09-18-2010, 10:36 AM
#4
Joined: Sep 2010
Location: Atlanta
Posts: 184
Quote:
Originally Posted by NickFalk View Post
If you're already familiar with Objective-C and don't plan to develop for other platforms there's no reason to switch. It will certainly make it easier for you to get stuff "for free" through Apple's API's.

If however you'd like to move your projects to other platforms as well it might make sense to go down the C++ route as it has a much wider support...
Well it's not so much switching, as I have not actually started on a particular project. And I do plan on moving my projects to other platforms (if they become popular enough) so that was one thing in my head.
09-18-2010, 10:40 AM
#5
Joined: Sep 2010
Location: Atlanta
Posts: 184
Quote:
Originally Posted by GlennX View Post
OpenGL is of course a C API which means you can use it from either. Personally, I'd always choose C++ and keep the use of Objective C to a minimum.This is vital to me because portability and being able to work with programmers who know even less Objective C than I do is important. I know at least ten times as many C++ programmers as objective C.
Ya i was going to take some examples I had and simply convert them to C++ to get more familiar...with the exception of the EAGLView and ...AppDelegate files of course.

Have you noticed a performance difference on using C++ vs Obj C at all?
09-18-2010, 12:44 PM
#6
I prefer C++ anytime...

I hate when companies like Apple or Microsoft are creating a new programming language just to be different.

World of Khaos a tower defense game with shoot 'em up mayhem
Space Falcon Reloaded - Arcade space shooter like no other
Rapid Turtle Games | Twitter | Facebook
09-18-2010, 01:19 PM
#7
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Quote:
Originally Posted by FlagellumDei View Post
I prefer C++ anytime...

I hate when companies like Apple or Microsoft are creating a new programming language just to be different.
I think you should look into the history of Objective-C as your statement doesn't make much sense... ;-)
09-18-2010, 01:20 PM
#8
Quote:
Originally Posted by FlagellumDei View Post
I prefer C++ anytime...

I hate when companies like Apple or Microsoft are creating a new programming language just to be different.
Microsoft is guilty of this, but not Apple... Objective C was invented almost 30 years ago, and was licensed by NeXT in the late 1980s. The reason it's kicking around at Apple now is because OSX (and now iOS) is heavily based on code from NeXT that Apple integrated when acquiring them in the 1990s.

Anyway, if the OP is looking for quick results, and is more familiar with Objective C then simply use it. Don't worry about speed issues until you run into them (no premature optimization)! Don't worry about cross platform compatibility until you prove you're able to finish a game that is awesome enough that people on other platforms want it.

Edit- NickFalk beat me by 1 minute on the Obj C comments!

--- ChronoSoft ---
Support your roguelikes! Play Rogue Touch today!
Spirit Hunter Mineko: Demons Reach --- Work in progress! Follow us on Twitter!
09-18-2010, 01:52 PM
#9
Joined: May 2009
Location: UK
Posts: 741
Quote:
Originally Posted by pchukwura View Post
Ya i was going to take some examples I had and simply convert them to C++ to get more familiar...with the exception of the EAGLView and ...AppDelegate files of course.

Have you noticed a performance difference on using C++ vs Obj C at all?
I've used C++ for 12 years and only written a few hundred lines of Objective C ever so i'm the wrong person to ask.

My iPhone programming has been in a rather cut down version of C++, lots of statically defined classes, very few allocations at load time, none at all while a level is running. It's a refreshing change from some of the large titles I've worked on and, I think, avoids lots of those memory headaches that are supposed to make C++ 'harder' than objective C.

-=< Fat Owl With A Jetpack >=-
-=< Topia World Builder >=-
-=< Twitter >=-
-=< Blog >=-
09-18-2010, 02:06 PM
#10
Joined: Sep 2009
Posts: 610
We use C++ because of portability. Writing everything in objective C is a bad idea as you may want to port the game to something like Android if the game is received well and you start thinking of other markets.