CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010
    Posts
    16

    Iphone Game Development

    Hi,
    I want to make a 2d mario like game for the iphone. I read a few months back that apple allows c++ games in. I know c and c++ What is my best course of action to making iphone games??
    Do I have to learn Obj C?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Iphone Game Development

    Yes, C++ can be done, but there's a lot of tweaks you have to do to the compiler and reading of the frameworks...since they are all set for Objective-C.

    If you already know C and C++, then it's not going to be much of a leap at all to add Objective-C to the belt.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Mar 2004
    Posts
    235

    Re: Iphone Game Development

    I made a game in using SDL/OpenGL and then ported it to iPhone. The main thing I had to do is wrap the entire game into a game class so it was like

    game->step();

    then in the drawing section
    game->render()

    and do something about event handling. I had my own joystick class so luckily I just had to add code the iPhone event style to invoke the joystick object as changes occur. eg in accelerometer event I would do joy->axis[0] = some number based on the acceleration.


    but using c++ I didin't have to tweak the compiler, just remane all the files to ".mm" which is the file extension for objective-c++.

    If you find a way to keep the original extension of .cpp and have xcode treat it as obj-c++ please do share.
    01101000011001010110110001101100011011110010000001110011011001010111100001111001

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured