Sounds like you are going to want to use SurfaceView and implement your own game loop. It is pretty easy to get up and running. You may also want to check out a game engine such as AndEngine or LibGDX.
AndEngine and LibGDX handle all of the set-up work for you and they are pretty nice to use. LibGDX is my favorite as it allows for more lower level access and I have found has better performance. And allows you to do all of your testing right on your computer and deploy to the device only when you need to.
If you aren't that familiar with OpenGL then it will definitely have a learning curve and I think you will spend the majority of your time learning it rather than jumping right and making something. If all you need is 2D then SurfaceView will be more than enough based on your description. You can do all of your collision detection with bounding rectangles which is super easy in Android.
You could try AndEngine. There are some samples with collision detection and 2D Games and so on: http://www.andengine.org/ It's a free Android 2D OpenGL Game Engine. Look at Youtube for some tutorials how to set it up (its a bit tricky).
I'd recommend NME. It gets great performance on Android (7 times faster than AIR, and 5 times faster than Corona, roughly), is free and mirrors the Flash API, so its easy to use.
Plus, after you're done, the game will also build for Windows, Mac, Linux, iOS, webOS, Flash and even HTML5 if you want it to.
I would prefer openGL for this, but using Game Engine will be more convenient. For Graphics in continuous loop should have best algorithm otherwise your FPS may jitter. Choice among two options given above, surely OpenGL. But be specific about your content and graphics while designing it. Check my blog on what to choose for game development
I would recommend you Libgdx. I have been using it for a month and i already got used to it. It is fairly simple and everything you will need to create a game for android , pc/mac/linux ,html is packed in as "gdx.*". It has classes like rectangle, sprite, batch renderer and anything you will need for a 2d game.
I also heard andengine people liked though but i never used it soo your choice.
发布评论
评论(6)
听起来您想要使用 SurfaceView 并实现您自己的游戏循环。启动和运行非常容易。您可能还想查看 AndEngine 或 LibGDX 等游戏引擎。
AndEngine 和 LibGDX 为您处理所有设置工作,并且它们非常好用。 LibGDX 是我最喜欢的,因为它允许更多较低级别的访问,而且我发现它具有更好的性能。并且允许您直接在计算机上进行所有测试,并仅在需要时部署到设备。
如果你对 OpenGL 不太熟悉,那么它肯定会有一个学习曲线,我认为你会花大部分时间学习它,而不是直接跳起来做一些东西。如果您需要的只是 2D,那么根据您的描述,
SurfaceView
就足够了。您可以使用边界矩形进行所有碰撞检测,这在 Android 中非常简单。Sounds like you are going to want to use
SurfaceView
and implement your own game loop. It is pretty easy to get up and running. You may also want to check out a game engine such as AndEngine or LibGDX.AndEngine and LibGDX handle all of the set-up work for you and they are pretty nice to use. LibGDX is my favorite as it allows for more lower level access and I have found has better performance. And allows you to do all of your testing right on your computer and deploy to the device only when you need to.
If you aren't that familiar with OpenGL then it will definitely have a learning curve and I think you will spend the majority of your time learning it rather than jumping right and making something. If all you need is 2D then
SurfaceView
will be more than enough based on your description. You can do all of your collision detection with bounding rectangles which is super easy in Android.如果您所做的只是一个简单的 2D 游戏,则不必费心使用 OpenGL。
Don't bother with OpenGL if all you are doing is a simple 2D game.
你可以试试AndEngine。有一些带有碰撞检测和2D游戏等的示例:
http://www.andengine.org/
它是一个免费的 Android 2D OpenGL 游戏引擎。查看 Youtube 上的一些教程,了解如何设置它(有点棘手)。
You could try AndEngine. There are some samples with collision detection and 2D Games and so on:
http://www.andengine.org/
It's a free Android 2D OpenGL Game Engine. Look at Youtube for some tutorials how to set it up (its a bit tricky).
我推荐NME。它在 Android 上具有出色的性能(大约比 AIR 快 7 倍,比 Corona 快 5 倍),免费且镜像 Flash API,因此易于使用。
另外,完成后,如果您愿意,该游戏还可以针对 Windows、Mac、Linux、iOS、webOS、Flash 甚至 HTML5 进行构建。
http://www.haxenme.org
I'd recommend NME. It gets great performance on Android (7 times faster than AIR, and 5 times faster than Corona, roughly), is free and mirrors the Flash API, so its easy to use.
Plus, after you're done, the game will also build for Windows, Mac, Linux, iOS, webOS, Flash and even HTML5 if you want it to.
http://www.haxenme.org
我更喜欢 openGL,但使用 Game Engine 会更方便。对于连续循环中的图形应该有最好的算法,否则你的 FPS 可能会抖动。上面给出的两个选项中的选择,肯定是OpenGL。但在设计时要具体说明你的内容和图形。查看我的博客,了解游戏开发的选择
Android 游戏开发 - 选择什么
Canvas 或 OpenGL 或 LibGDX 或游戏引擎!!
希望这对你有帮助..
I would prefer openGL for this, but using Game Engine will be more convenient. For Graphics in continuous loop should have best algorithm otherwise your FPS may jitter. Choice among two options given above, surely OpenGL. But be specific about your content and graphics while designing it. Check my blog on what to choose for game development
Android Game Development - WHAT TO CHOOSE
Canvas or OpenGL or LibGDX or Game Engines!!
HOPE this may be helpful for you..
我会推荐你 Libgdx。我已经使用它一个月了,我已经习惯了。
它相当简单,包含为 android、pc/mac/linux 创建游戏所需的一切
,html 被打包为“gdx.*”。它有矩形、精灵、批处理渲染器等类以及 2d 游戏所需的任何类。
我也听说人们喜欢和引擎,但我从未使用过它,所以你的选择。
I would recommend you Libgdx. I have been using it for a month and i already got used to it.
It is fairly simple and everything you will need to create a game for android , pc/mac/linux
,html is packed in as "gdx.*". It has classes like rectangle, sprite, batch renderer and anything you will need for a 2d game.
I also heard andengine people liked though but i never used it soo your choice.