Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
520 views
in Technique[技术] by (71.8m points)

cross platform - How mature is SDL for iPhone?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...