Objective-C or C++ for a new game developer?

pb2ya
Unregistered
 
Post: #1
I've been having a really hard time with choosing which language to get deeper into and learn to program games with. Basically, right now, all I really care about is saving time and frustration. Which language, given that I have gone through most of a C++ book and know little C, should I go with for developing games? I'm really not interested in doing anything as complex as a 3D engine; I'm more looking forward to making some 2D games with SDL. Frankly, C++ is intimidating to me. The more complex uses of pointers and references leave me scratching my head, and the fear of memory leaks from code that looks completely normal to me seems all too real. I would definitely bite the bullet and grind through the later chapters of my C++ book again if I had to, but Objective-C, from what I've heard, seems like a beacon of light. Is it really that easy to learn it? With very basic knowledge of C, and a few day's worth of study in Objective-C, can I really start to program Cocoa apps and games? That's what I've read, and I really hope it's true. I'm really more of a designer and artist than a programmer (although I still do enjoy doing it), and I'm more concerned with actually materializing my ideas than writing complex particle effect algorithims, or something.

Thanks in advance to anyone who tries to help me out here, I've been becoming more and more frustrated in my quest to be able to develop games in SDL.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
I think you should continue writing games in C until you dont fear the pointer.
Also if you want to avoid time and frustration embedding scripting languages into your C code can save a lot of compile times.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
pb2ya
Unregistered
 
Post: #3
I don't know if I've made this clear, but I haven't really made any games yet. I'm assuming by your reply, though, that C/Objective-C really is easier?

Thanks for the embedding scripting languages tip; I'm definitely looking into that.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #4
Quote:C/Objective-C
I never mentioned obj-C

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
It really doesn't matter a great deal where you start. Different languages and APIs have different learning curves with different hurdles to get over. If you think ObjC+SDL will be best for you, go for it.

If you want a really simple language to start in, you might try Python with the PyGame API (which is basically a wrapper for SDL). It comes with some good examples, too.
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #6
pb2ya Wrote:I'm really more of a designer and artist than a programmer (although I still do enjoy doing it), and I'm more concerned with actually materializing my ideas than writing complex particle effect algorithims, or something.

Thanks in advance to anyone who tries to help me out here, I've been becoming more and more frustrated in my quest to be able to develop games in SDL.
Have you looked into Unity?
Quote this message in a reply
Member
Posts: 204
Joined: 2002.09
Post: #7
The answer, of course, is whatever language you are most comfortable with. The choice of language is somewhat academic... any of the ones you listed will do. The main thing to do is start (and not stop Rasp ).
Quote this message in a reply
pb2ya
Unregistered
 
Post: #8
Thanks, everyone. I once read that you can get a firm grasp of Objective-C "in an afternoon," and for some dumb reason I kind of inferred that an afternoon's worth of Objective-C knowledge would do for making some simple SDL games. Wishful thinking, I guess. Thanks Cookie for clearing that up. Anyways, I think I'm learning towards C right now. With that, I can make portable games with SDL, plus some nice Cocoa apps with a little Obj-C study (writing Carbon apps with C++ seem to be a pain, I'm not interested in going through an entire book to learn how to write them).

But then again, that unfinished C++ book across the desk is making me feel really guilty.

AnotherJake Wrote:Have you looked into Unity?
OneSadCookie Wrote:If you want a really simple language to start in, you might try Python with the PyGame API (which is basically a wrapper for SDL). It comes with some good examples, too.
Thanks, but I want to learn a language portable enough to where I can eventually develop games for the Dreamcast and GP32.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
The language is really kind of irrelevant... once you know one, picking up another is very easy. Just another reason why it doesn't really matter where you start.
Quote this message in a reply
pb2ya
Unregistered
 
Post: #10
I might as well just go with C++ then; I have much more experience with it than C. If I ever want to develop a Cocoa app, I'll always be able to do it in Java.
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #11
OneSadCookie Wrote:The language is really kind of irrelevant... once you know one, picking up another is very easy. Just another reason why it doesn't really matter where you start.
Completely true, but C really is a notably good center to branch out from. Heck, I learned that before I ever learned a scripting language. Of course, back when I started, scripting languages weren't as popular because processor cycles were harder to come by, but that's another story...

pb2ya Wrote:I might as well just go with C++ then; I have much more experience with it than C. If I ever want to develop a Cocoa app, I'll always be able to do it in Java.
1) Don't do Cocoa in Java.
2) Learning C++ is fine, but you will still be learning C anyway.
3) As soon as you learn C, you will be able to pick up Obj-C very easily.
4) C is good.
5) C++ is not so good for beginners. (disclaimer: I'm not saying not to learn C++, I'm just saying...)
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #12
C++ is probably the most complicated programming language on the planet; that is a strike against it from a "learn me first" perspective. I'd definitely recommend Java, Python or even C as a somewhat simpler starting point.

C has the advantage that it makes stepping up to C++ or ObjC easier.

I second the "don't do Cocoa in Java" thing -- it was horrible, and is now deprecated. Cocoa in Python is a much better plan -- http://pyobjc.sf.net/
Quote this message in a reply
pb2ya
Unregistered
 
Post: #13
Haha, wow, I'm pretty relieved now. I didn't know there was such a significant difference in the complexity of C++ and C. I'm sure that I could continue learning C++ now if I really put a lot of effort to it, but if C is really the great launching pad you claim it to be, I'm definitely going with it.
...plus, I'll be able to make my own Rogue hack.

Thanks a lot!
Quote this message in a reply
Member
Posts: 161
Joined: 2005.07
Post: #14
Am I the only one who thinks C++ is easier to use than C and Obj-C? I picked up C++ pretty easily after switching from REALbasic for games (shut up Wink, then I had a lot more difficulty with C and its lack of classes (took me a while to get accustomed to structs and placing related functions in the same file and pretending that's a "class" in my mind, as well as the weird memory allocation), and I never even came close to picking up Obj-C.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #15
ObjC is a lot easier than C++... I think you'd be hard-pressed to find anyone who'd argue with that.

Personally, I'd take the simplicity of C over the disaster zone that is C++ any day, but I realize I'm in a minority there Wink
Quote this message in a reply
Post Reply