适用于 iPhone 的 SDL 有多成熟?

发布于 2024-07-13 22:24:15 字数 628 浏览 5 评论 0原文

一段时间以来,我一直在考虑尝试移植我最喜欢的经典 PC 游戏之一,原始拳大师< /a>(又名 Star Control 2)到 iPhone。 UQM 将 SDL 用于所有图形、声音、输入和其他游戏内容,似乎确实有 SDL 到 iPhone 的端口,但目前看起来还不是很成熟。

有人测试过 iPhone SDL 端口吗? 效果如何? 这个项目已经是 iPhone 的跨平台代码,我预计会遇到哪些问题?

如果 SDL 不是一个选项,任何人都可以推荐一个替代框架来查看,以弥补 SDL 与 OpenGL ES 和 Core Audio 等本机库之间的差距吗? 或者对这些框架进行编码是最好的选择吗?

编辑添加:这是论坛主题的链接< /a> 在 UQM 论坛上了解如何移植 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

筱果果 2024-07-20 22:24:15

更新
这个答案确实已经过时了,所以你可以停止投票了!

我不再使用 SDL 进行 iPhone 开发,因为它不适合 iPhone 型号。 例如,SDL 坚持拥有 main(),音频子系统不知道 AudioSessions,很难发现视图方向的变化,等等。很高兴看到熟悉的面孔,但最终 SDL 引入的问题比它解决的问题还要多。

2009年答案
svn 版本对我来说效果很好。

我遇到了一个问题,那就是 atexit(SDL_Quit) 崩溃。

所以我禁用了清理功能。

另外,库名称不合理,但您可以更改它。

对我来说最困难的部分是将我的 SDL 代码移植到 SDL-1.3,并将我的 OpenGL 代码移植到 OpenGLES。

OpenGLES 按照您的预期工作,加速度计显示为 3 轴操纵杆,
而且声音很扎实。

我给 iPhone SDL 4.5 评分(满分 5 星)。

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.

要走就滚别墨迹 2024-07-20 22:24:15

iPhone 端口的表现符合预期,但确实有一点未完成的感觉。
交付时,与 SDK 集成并不那么容易,这对于某些游戏来说可能没问题,但我认为大多数用户对当今的游戏期望更多,例如社交网络连接。

幸运的是,只需付出一点努力,您就可以通过 SDL 使用大部分 iPhone SDK。

请参阅我的教程,弥合差距

以及简单 DirectMedia 层论坛上的博客。

SDL 往往会弄乱表视图中的触摸事件,但您可以通过使用单独的 cfrunloop 运行来解决此问题。

性能接近于使用普通 OpenGL

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文