views:

6923

answers:

3

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 its graphics, sound, input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn't look very mature at this point.

Has anyone put the iPhone SDL port through its paces? How well does it work? What kinds of issues can I expect taking this project, which is already cross platform code to iPhone?

If SDL isn't an option can anyone reccomend an alternative framework to look at that will bridge the gap between SDL and the native libraries like OpenGL ES and Core Audio? Or is coding to those frameworks the best option?

Edit to add: Here's a link to a forum thread on the UQM forum about doing an iPhone port.

+11  A: 

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.

Rhythmic Fistman
Great news, thanks!
Mike Akers
I've read elsewhere that the SDL port doesn't handle the newer SDKs well. What OS version are you using?
caspin
Rhythmic Fistman
+1  A: 

Of note to others is that "SDL" is the Simple DirectMedia Layer:

http://www.libsdl.org/

Kendall Helmstetter Gelner
What iPhone SDL project are you talking about? I just did an SVN checkout from svn.libsdl.org and I don't see anything related to iPhone. There are a couple of files called SDL_ipodvideo.*. That's it.
Buggieboy
A: 

The iphone port works as expected, it does have a bit of an unfinshed feel to it. As delivered its 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

http://web.me.com/cannonwc/Site_4/Blog/Archive.html

and blogs on www.libsdl.org/forum

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

Performance is close to working with just plain vanilla open gl.

michelle