Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Objective C A Suitable Language For 3D Games?

I see a lot of debate going back and forth on which language to use to develop real-time 3D games, and the general consensus is that C or C++ are the only languages that can offer suitable performance for high-end, system-intensive 3D games. I see a lot of people saying C#, Java or Python are too slow, particularly because of garbage collection. How about Objective C? Does Objective C have automatic garbage collection? What besides Automatic Garbage Collection make a language 'too slow' or unsuited for 3D games?

This question is probably more of a 'thought experiment' since I doubt I'll ever develop a game that is so resource heavy that these questions need to be addressed, but being a programmer, I'm inexplicably obsessed with performance, so I'd still like to know just for my own jollies.

like image 820
Hooray Im Helping Avatar asked May 30 '09 03:05

Hooray Im Helping


1 Answers

Objective-C 2.0 has garbage collection available on Mac OS X 10.5, but it is optional -- you can still compile Objective-C apps without garbage collection if you so choose. On other platforms (iPhone, Mac OS X pre-10.5, and anything else), there is no garbage collection, and you have to manually manage your memory.

Objective-C is a strict superset of C, so you can code plain C in Objective-C if you want. Hence, there's no reason not to use Objective-C for games that wouldn't also apply to using C. You can use the extra features Objective-C provides as much or as little as you want.

like image 103
Adam Rosenfield Avatar answered Oct 30 '22 15:10

Adam Rosenfield