View Full Version : 2d game questions
Apr 11, 2009, 06:09 PM
Okay so I've got a few questions on how to set up a 2d game in Xcode/Interface Builder. I'm new to both so I'm sorry if these questions are stupid or obvious. I was wondering how I would load a map file onto the screen so that you can travel on it. Would it be better to use an OpenGL View or a Custom View? And with either one how would I go about loading it in. Would it just be better to create it all in OpenGL? Any other advice on how to use Interface Builder would be helpful in general since I'm fairly confused.
Apr 11, 2009, 06:14 PM
And I guess this also applies to the troubles I've been having creating a 2d level editor as well....
Apr 12, 2009, 09:00 PM
Now I know nearly nothing about Xcode and such, but I found a great youtube video that shows a VERY simple tutorial of how to use Interface Editor. Also, are you new to Xcode or to programming? (just curious)
Apr 12, 2009, 09:47 PM
It's going to take a lot of work to write your own game engine and if you're new to programming even longer. I'd suggest using one of the existing game engines out there instead (Unity, Ogre, etc).
Apr 12, 2009, 11:03 PM
No I'm not new to programming I've just come over from the dark side (PC). I use to program in C++ and I have a pretty good grasp of Objective-C it's just Xcode and Interface Builder are pretty confusing...at least to me.
Apr 13, 2009, 08:11 AM
This should get you started on how to add a view:
The same method can be used for OpenGL but you need to use an NSOpenGLView instead. Either way you should subclass that or an NSView.
If you're not sure whether you should use Quartz or OpenGL for your game, I'd suggesting reading up on those technologies and getting a better grasp of what they do.