How mature is SDL for iPhone?

后端 未结 2 447
花落未央
花落未央 2020-12-14 17:26

For a while I\'ve been thinking of trying to do a port of one of my favorite classic PC games, The Ur-Quan Masters (aka Star Control 2) to the iPhone. UQM uses SDL for all i

相关标签:
2条回答
  • 2020-12-14 18:01

    UPDATE
    This answer is really out of date, so you can stop up voting it!

    I no longer use SDL for iPhone development because it doesn't fit the iPhone model. e.g. SDL insists on owning main(), the audio subsystem doesn't know about AudioSessions, it's hard to pick up on view orientation changes, etc. It was nice to see a familiar face but in the end SDL introduced more problems than it solved.

    2009 answer
    The svn version's working well for me.

    I had one problem and that was a crash in atexit(SDL_Quit).

    So I disabled cleanup.

    Plus the library names are not sensible, but you can change that.

    The hardest part for me was porting my SDL code to SDL-1.3, and porting my OpenGL code to OpenGLES.

    OpenGLES works as you'd expect, the accelerometer shows up as a 3 axis joystick, and sound is solid.

    I give iPhone SDL 4.5 out of a possible 5 stars.

    0 讨论(0)
  • 2020-12-14 18:06

    The iPhone port works as expected, and it does have a bit of an unfinshed feel to it. As delivered it's not that easy to integrate with the SDK, that may be OK for some games, but I think most users expect more out of games today, like social network connections.

    Fortunately with a little effort you can use most of the iPhone SDK with SDL.

    See my tutorial here, Bridging the Gap.

    and blogs on the Simple DirectMedia Layer Forums.

    SDL tends to mess up touch events in tableviews, but you can fix that by run in with a separate cfrunloop.

    Performance is close to working with just plain vanilla OpenGL.

    0 讨论(0)
提交回复
热议问题