2d game questions

Discussion in 'Mac Programming' started by daggoth, Apr 11, 2009.

  1. macrumors newbie

    Joined:
    Jan 23, 2009
    #1
    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.
     
  2. thread starter macrumors newbie

    Joined:
    Jan 23, 2009
    #2
    And I guess this also applies to the troubles I've been having creating a 2d level editor as well....
     
  3. macrumors member

    Joined:
    Mar 28, 2007
    #3
    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)

    http://www.youtube.com/watch?v=y2MSvZT3zWU
     
  4. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    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).
     
  5. thread starter macrumors newbie

    Joined:
    Jan 23, 2009
    #5
    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.
     
  6. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    This should get you started on how to add a view:

    http://cocoadevcentral.com/d/intro_to_quartz_two/

    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.
     

Share This Page