iphone game development on Windows?

Moderator
Posts: 3,570
Joined: 2003.06
Post: #16
[edited for clarity] As a note: We aren't allowed to talk about "hackintoshes" around here. Besides the fact that it'd blatantly break all kinds of agreements with Apple, you'd be running on unsupported hardware with god-only-knows what kinds of problems in conjunction with iPhone development... plus, I assume Seth intends to uphold existing forum policy that we don't allow such discussion here at iDG since it violates said agreements with Apple, in addition to the fact that it wastes everyone's time to try to help others who are using hardware/software combinations that weren't meant to work in the first place.
Quote this message in a reply
Moderator
Posts: 438
Joined: 2003.08
Post: #17
Well, I did edit myself (and the quote), though not sure how much help that will be. You do bring up a good point.
Alex
Quote this message in a reply
Member
Posts: 20
Joined: 2010.09
Post: #18
Thanks. It was tedious to get through all the oddities of each environment, but it pays off in the end, as in, it looks good on a resume. Smile

Thomas.
http://www.rattansoftware.com
Groundhog Assault 3D (Apple App Store)
Quote this message in a reply
Member
Posts: 164
Joined: 2010.10
Post: #19
(Dec 11, 2010 11:22 AM)Ropeburn Wrote:  .....I have graphics interface layer that allows me to switch between desktop GL and GLes at compile time. For GLes on my Windows box, I use the PowerVR simulator, which I would recommend. On top of that I have an abstracted input and windowing system that allows for me to create graphics contexts for a number of different system (WGL, EGL, iPhone, etc). This also helps developing for multiple platforms. So to anwser the question, it is doable, it is a lot of work, I've learned alot, wrote a ton of platform code. Maybe I would add and recommend you start with known library for cross platform game development. I haven't used any, so I'm not going to recommend any, but they are out there.
Good Luck.

are there any tutorial, book, or code samples with this argument (developing for multiple platforms)?
Quote this message in a reply
Member
Posts: 20
Joined: 2010.09
Post: #20
I don't know of any books of the top head that cover the subjects, but I wouldn't be surprised if there were a few. GLUT of course handles desktop GL for Mac, Linux and Windows well enough. I actually prefer GLFW because it offers more in terms of framework and have been surprised that it hasn't caught on more. Of course, the issue with GLUT and GLFW, as far as I know, don't support EGL or iPhone dev at the moment. Because I've been so paranoid about platforms, I have my own wrapper "tGame" that I hide platform code behind.

From tGame, I derive tGameGlut, and from there, tGameGHA (groundhog assault). tGameGlut is a wrapper around GLUT. It installs the GLUT handlers and routes all the GLUTs events through predefined, overloadable methods. Absolutely all the game code is under tGameGHA. I do 90% of my development with this inheritance under Windows, but it works equally well under XCode on the Mac.

GLUT is supported on the Mac, good. But for the Iphone, I have another class derived from tGame, that is tGameIPhone. At compile time, via a XCode project, I can switch the tGameGHA parent class to tGameIPhone and everything works.

I have another class tGameEGL which allows me to use the the PowerVR simulator.

Here's the rough tGame base definition.
Code:
class    tGame
{
    public:
    virtual void  onProcessKey       (const tUL key);
    virtual void  onTouchBegin       (const tIVec2 *pV,const int n);
    virtual void  onTouchEnd         (const tIVec2 *pV,const int n);
    virtual void  onTouchMotion     (const tIVec2 *pV,const int n);
    virtual void  onAccelerometer   (const tVec3 &acc);

    virtual void  onWarpCursor       (int x,int y)                 = 0;
    virtual void  onEnableCursor     (void)                        = 0;
    virtual void  onDisableCursor    (void)                         = 0;
    
    virtual void  onFullScreen        (void)                        = 0;
    virtual void  onSetVSync        (int interval = 60)           = 0;

    virtual int      initDefaults            (int argc,char **argv)  = 0;
    virtual int      initGraphics            (void)                        = 0;
    virtual int      initRenderManager   (void)                        = 0;
    virtual int      initSoundManager    (void)                        = 0;
    virtual int      initGlobals        (void)                        = 0;
    virtual int      initStateManager        (void)                        = 0;
    virtual int      initWorld        (void)                        = 0;
    virtual int      initEvents        (void)                        = 0;

    virtual void  exeFrame          (void);
    virtual void  gameLoop          (void);

    virtual int   initGame            (int argc,char **argv);
    virtual void  exitGame          (int rc = 0);

    tGame();
    virtual ~tGame();
};


class    tGameGlut : public tGame
{
...
};

class    tGameIPhone : public tGame
{
...
};

class    tGameEGL : public tGame
{
...
};


#ifdef WIN32
#define BASEGAME tGameGLUT
#elif MAC
#define BASEGAME tGameGLUT
#elif LINUX
#define BASEGAME tGameGLUT
#elif POWERVR
#define BASEGAME tGameEGL
#elif TEGRA
#define BASEGAME tGameEGL
#elif ANDROID // ?????
#define BASEGAME tGameEGL
#elif IPHONE
#define BASEGAME tGameIPhone
#endif

class    tGameGHA : public BASEGAME
{
...
};

Anyway, that is how I've done it and it works well for me.

T.

Thomas.
http://www.rattansoftware.com
Groundhog Assault 3D (Apple App Store)
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #21
I think SDL is probably best for cross-platform dev since it handles joystick input as well as providing an audio interface, among other things, which GLUT doesn't support. I glanced at GLFW once but I seem to recall it didn't offer the audio interface, nor did it support joysticks (but don't quote me on this).

I haven't seen any books on cross-platform game development.
Quote this message in a reply
Member
Posts: 20
Joined: 2010.09
Post: #22
I have no experience with SDL, but it certainly an option. For sound, I'm using OpenAL which seems supported on most of the platforms I've checked, except maybe Android?

Thomas.
http://www.rattansoftware.com
Groundhog Assault 3D (Apple App Store)
Quote this message in a reply
Member
Posts: 164
Joined: 2010.10
Post: #23
thanks a lot for explanation, i'll try something
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Switching developers mid-game development fauxdev 4 611 Feb 17, 2014 05:46 PM
Last Post: funkboy
  How to get started in game development! Taxxodium 18 44,574 Jun 5, 2012 03:55 PM
Last Post: AnotherJake
  [Book] Cocos2d for iPhone 1 Game Development Cookbook NathanBurba 1 4,800 Jan 8, 2012 05:40 PM
Last Post: mmztech
  Feedback on my new iPhone Development Service, is it relevant for games? sashthebash 3 5,333 Nov 2, 2010 01:17 AM
Last Post: cmiller
  Learning Cocoa game development Miglu 17 15,358 Aug 8, 2010 02:25 PM
Last Post: Miglu