Where Do I Start?

EssentialParadox
Unregistered
 
Post: #1
Hi guys, I am looking for help on starting programming on OS X using Xcode, I have a few questions but I'll start simply…

I read a C++ book about 4 years ago, followed by a Direct3D programming book. This was using Visual Studio, so I have some understanding of game programming on the Windows platform. Now I have a Mac and now I want to come back to my game programming enthusiasm, except I want to go back over most of what I have learnt (and this time for OpenGL) but I wasn't able to find any beginner tutorials in C++ - they all seem to be Objective C, bringing me to my next point…

I read the great intro sticky, written by Taxxodium, which was very helpful, and I learnt that apparently Objective C is better than C++? I'd be happy to re-learn Objective C this time around, BUT… I am learning with the intention to eventually apply my knowledge towards video game console programming (currently interested in Nintendo's Wii) and I am not sure which direction, or language, would be most appropriate for console programming and I am not sure what the 'industry standard' language is for game consoles. Would I be able to learn coding Objective C games and then move over to a Wii dev kit sometime in the future and still have success in Objective C? Or wouldn't Obj. C be supported in console programming? Or maybe using Obj. C wouldn't work within an established studio team, who would already be accustomed to a 'standard' console programming language (C++? C? Is there a standard?)?

So in simple terms, what I want to do is learn game programming for consoles but beginning with using my Mac and Xcode (transitioning to the additional console-specific programming techniques and SDLs at a later date, once I have enough experience.)
Does an Xcode tutorial exist for what I want to do? Originally I was looking at the OpenGL tutorial on nehe.gamedev.net but I was having trouble understanding the differences between using OpenGL on Win and OS X (I'm not even sure if OpenGL is the correct graphics framework I should be learning for console programming.)

I have a little bit of knowledge but, as you can see, I'm mostly a big newbie. Smile
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
The languages and APIs are almost completely irrelevant. Once you know one or two, the others are all essentially the same. Don't treat it as a massive hurdle, and it won't be one.

For Mac OS X, you'll be using OpenGL for graphics, and one of SDL, Cocoa or Carbon for windowing and events. If you're using SDL or Carbon, you have the choice of C, C++ or Objective C (or Python, Ruby, ... via third-party bindings) for interacting with those APIs; if you're using Cocoa you must use Objective C (or Python, Ruby, ... via third party bindings). Again, whichever you choose, you can use that language or another for programming the actual "game" bits of your game.

The bottom line is, there are no "right" or "wrong" choices here. Whatever you decide, it'll be a good foundation for wherever you want to go. The only consideration I'd give to a starting point is what you can get the most help with. This community is pretty knowledgeable about C and Objective C, SDL and Cocoa. C++ is much more complex, and perhaps somewhat less used, but the level of knowledge should still be more than adequate. Almost nobody uses Carbon any more, so it can be hard to find answers to Carbon questions.

[for interest's sake, despite the fact that it's completely irrelevant -- the GameCube uses a proprietary graphics API that's quite close to OpenGL; I assume the Wii will do the same. The PS3 uses OpenGL ES (2.0, I assume?) with some modifications (Cg instead of GLSL). The Xbox 360 uses something very similar to DirectX 9c.]
Quote this message in a reply
EssentialParadox
Unregistered
 
Post: #3
Thank you very much for your reply, OneSadCookie. I think you've resolved most of my questions.

I think I would like to code in Objective C under Cocoa to begin. I think my main problem is I don't know how drastically different the different kinds of C are from one another. But do you know if I learn Obj. C, would it be possible to still code Gamecube / Wii games in that language? Or are they generally made in C++ (if anyone knows.) I mentioned Gamecube too (as you did) because I know the development architecture of Wii is very similar to Gamecube, and I know there is an open source Gamecube SDK out there, so I could aim to program on the GC as a stepping-stone to Wii (even though that's insignificant to consider this early on.)

Do you think my best bet is to start with this nice-looking Xcode/GLUT Tutorial I found at http://onesadcookie.com/Tutorials ?
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #4
AFAIK, even though there are compilers for ObjectiveC on other platforms, it's only widely used on the Mac. Since you already know C++, I'd suggest sticking with that. The only thing is you'll need to work out the differences between gcc and Microsoft's compiler and their preferences for style of code. Though you'll get less Mac-specific help with C++, if you're using SDL and other cross-platform libraries, there's going to be a lot more general help. Only a very small percentage of that would be platform specific, and would most likely be limited to things such as differences between compilers.
Quote this message in a reply
EssentialParadox
Unregistered
 
Post: #5
Yeah, I think that's a good point, akb825. If there are more problems in coding with C++ then it would be a better idea for me to learn how to deal with those problems from the outset. I'll look more into the differences between Objective C coding and C++. I'll still take a look at OneSadCookie's tutorial, but I might go back to C++ once I'm familiar with Xcode.

Thanks very much guys! Smile
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #6
Well, I think you mistook my point. Rasp There are differences, but they aren't that sweeping. (not nearly as much so as learning a new language) The differences that I've dealt with have mainly been with template syntax, such as declaring the constructors and destructors. gcc, or at least the version that comes with XCode, requires the <T> in declaration of the constructor and destructor (ex: MyClass<T>(), ~MyClass<T>()), while MSVC++ gives you warnings saying that you shouldn't have them, but it works just fine. There are a few things that pop up here and there, but it's not very difficult to get your code to work on both. (assuming you don't mind the warnings Wink) I'm suggesting you stick with C++, and what I was trying to say about the availability of help was that it will almost always be platform independent, with the small exceptions with things like the variations of style of the compiler, which you would have already dealt with and know your way around.
Quote this message in a reply
Post Reply