适用于 Android 2D 游戏的 2D API 或 OpenGL ES?
我计划为没有专用 GPU 的 Android 设备(例如 HTC Wildfire)开发 2D 游戏。我记得在 PC 上,由于速度和功能的原因,对于 2D 图形,通常会选择 OpenGL 而不是 SDL 之类的东西。
在 Android 上,有两种用于图形的 API:
- “普通”2D API(有名称吗?)
- OpenGL ES 2.0
对于应该在没有专用 GPU 的 Android 设备上运行的 2D 游戏,我应该选择哪一个?
I'm planning to develop a 2D game for Android devices without a dedicated GPU, like the HTC Wildfire. I remember from the PC that OpenGL is generally to be chosen over something like SDL for 2D graphics because of speed and features.
On Android, there are two APIs for graphics:
- A "normal" 2D API (does it have a name?)
- OpenGL ES 2.0
Which one should I favor for a 2D game that should run on Android devices without a dedicated GPU?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
取决于您的经验和游戏的范围,两者都有优点和缺点。我会观看 Chris Pruett Google IO 讲座,当我第一次开始在 Android 上进行游戏开发时,他们给了我很多帮助。
就我个人而言,我在画布上使用 OpenGL(或者你所说的“正常”),因为我已经熟悉它了。我正在使用这种方法开发的游戏即使在旧的 myTouch 手机上也能运行得很好(使用线程并小心 GC)。
Depends on your experience and the scope of the game really, there are benefits and drawbacks for both. I would watch the Chris Pruett Google IO Lectures, they helped me out a lot when I was first getting started with game dev on Android.
Personally I went with OpenGL over the canvas (or "normal" as you called it) since I was familiar with it already. The game I am working on under this approach works pretty well (with threading and being careful of the GC) even on the old myTouch phones.