适用于 Android 2D 游戏的 2D API 或 OpenGL ES?

发布于 2024-10-01 12:09:40 字数 268 浏览 1 评论 0原文

我计划为没有专用 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 技术交流群。

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

发布评论

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

评论(1

我乃一代侩神 2024-10-08 12:09:40

取决于您的经验和游戏的范围,两者都有优点和缺点。我会观看 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.

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