Game Development in C++

Discussion in 'Mac Programming' started by iDevCplusplus, Jan 30, 2010.

  1. iDevCplusplus macrumors newbie

    Jan 30, 2010
    I have experience in VB and in RealBASIC, however I want to make games in C++. When I look for resources on C++ game development I only find Windows Specific Books/Guides:mad:. Can anyone help me get started C++ game developing on the mac?
  2. iDisk macrumors 6502a


    Jan 2, 2010
    Menlo Park, CA
    XCODE will allow some C++ code ext...............

    To be honest man. Learn Obj-C, and gain understanding of Cocoa API's. It's Apples land your in now and these are the main languages..... I can name more but it probably would not help you at the moment.

    You should have a team to do gaming apps (no more then 3) if your starting out. Find quality players to help build a great iphone/ipad app developers build together man. :)
  3. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Most game development on the Mac is cross platform anyway. OpenGL and OpenAL are the main graphics and audio engines. But I would recommend that you use an engine like Ogre3D rather than trying to build one yourself. It will save you an awful lot of time and it is cross platform compatible to boot.
  4. DaveMikesell macrumors newbie

    Nov 18, 2009
    If you want your game to be cross-platform, use C++. I wrote a simple OpenGL iPhone game consisting of exactly two Objective C++ classes (the app delegate and OpenGL View class - both generated from the project template) and the rest plain old C++. The view class creates and renders to the frame buffer, the rest of my code contains all of the GL, game logic, collisions, etc. You can even use Boost. The view creates a game object (C++) and calls theGame->doGameLoop() every frame.

    - (void)drawView {    
        [EAGLContext setCurrentContext:context];
    	glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
    	glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
        [context presentRenderbuffer:GL_RENDERBUFFER_OES];
    The view catches touch and accelerometer events and registers them with another C++ class that I wrote, which is in turn interrogated by those classes that handle input.
  5. mongrol macrumors regular

    Jul 16, 2007
    If you're just kicking off with C++ and games programming I strongly suggest forgetting about OpenGL just now. XCode has great C++ support. Look at for a pure C++ easy to use, fast library that does 2D graphics, audio, input, joystick handling and runs on Mac,Linux and Windows. It literally takes 10 minutes to install and trot through the tutorials. It's an excellent primer and support is fast and personal from the developer. SFML will let you learn game programming without worrying about all the low level stuff you can pick up later.

    The important thing is not to get sidetracked into starting too ambitious a project. Start small, make a pong or tetris game then decide where to go once you get some skills under your belt. Game programming is different from applications. Read and perhaps if you really want to tie yourself to Mac. There's really no good reason to tie yourself to Mac API's for games programming so ignore any suggestions towards that.

    Developer of Traction Edge

Share This Page