How to go about Fullscreen game

Discussion in 'Mac Programming' started by Duke Leto, Jul 26, 2009.

  1. macrumors regular

    Joined:
    Mar 17, 2008
    #1
    Ok, so I made that old gravity simulation I posted before. Then my dad had an idea, and I thought it would be cool to make a game based partly on it.

    I do not expect to get far, but maybe I will work on it and get at least something. Basically, it would be a 2 dimensional game that operated in fullscreen mode.

    I want to know what you think: Should I stick with Cocoa, or is it worth it to try to learn something else. One problem I do have with Cocoa, for example, is that I can not seem to make a fullscreen pixel format successfully when using an NSOpenGLView.

    I tried using the free Pangea Programming book, but it is outdated and I think it would not be a good reference.

    In conclusion, I am starting on a huge project and need some pointers on design, maybe books I should read, etc.
     
  2. macrumors regular

    Joined:
    Jul 16, 2007
  3. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    The OpenGL red book and orange book will be pretty indispensable. The free version online is very old so make sure you get the latest edition (a new one will most likely be coming out soon which should cover OpenGL 3.0 or 3.1 which fingers crossed Snow Leopard should support).

    You might want to look into using a third party engine such as Unity 3D if you want to cut your workload down substantially.

    You will also most likely want to learn about OpenAL for audio and some form of game based AI.

    BSD sockets are also going to be useful if you want to make sure your game is as easy to port to other platforms as possible.
     
  4. thread starter macrumors regular

    Joined:
    Mar 17, 2008
    #4
    Thank you so much for all of the resources.

    I went to idevgames, which led me to get Code blocks. If only I could get that C++ book back from my friend ...

    If anyone has used Code Blocks and has tips for me, please tell. I am confused about using it, but I think it is what I should use.
     
  5. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    Why are you using Code Blocks? Xcode works fine for OpenGL programming even if you are using something like SDL to handle input and window management (do not use GLUT though).
     
  6. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    Can you post the code you're using? Are you using NSOpenGLPFAFullScreen?
     
  7. macrumors regular

    Joined:
    Jul 16, 2007
    #7
    I agree. I'm writing a game in C++ with SFML on Xcode and it works flawlessly. Same workflow and environment when using Cocoa. While I mention it, you could possibly look at www.sfml-dev.org as a nice easy framework for getting OpenGL contexts up and running. C++ mainly though.
     

Share This Page