Android 2D game development without an engine

会有一股神秘感。 提交于 2019-12-04 09:45:25

问题


I want to know the best way or a tool for making a good Android game!, I mean by "good" that the game must have a nice performance no lags or something like that, ..

So I will begin by 2D game development, and I want to avoid "Game engines"! ..

So what's the best way?! - to make it by Open GL ES or there another way?! ..


回答1:


It's possible that this is considered too broad a question - we can't tell you how to make a game. But in response to your last question: yes, OpenGL is the best way to make a high performance game in 2D or 3D. If you have a more slow moving, turn based game, then you could stick to a Canvas on a SurfaceView or even use basic View widgets to build up the layout of a game board.

But if it's your first game, unless you have a lot of time and patience, I would strongly urge you to try an existing game engine. You may not realise how much work goes into a decent game engine until you're halfway (or 10% of the way) into making one. Have a look at the source of an engine like LibGDX and think about whether it's the sort of thing you'd be able to write.

There's plenty of info in the Android graphics dev guide.




回答2:


You should be able to learn a lot about open gl graphics programming by looking at Replica Island. Its an open source 2d Platform game which uses no engine. The author gave some talks on Google IO which might be of interest to you:

  • http://www.youtube.com/watch?v=U4Bk5rmIpic
  • http://www.youtube.com/watch?v=7-62tRHLcHk
  • http://www.youtube.com/watch?v=cdvaPyq_eBU



回答3:


You do not need a game engine to develop a 2D game in Android. You do not need to use SurfaceView either. SurfaceView, OpenGL and AndEngine and (maybe other game engines) have issues with consistent sprite animation speed and size of sprites across the various Android devices. Especially when the game has complex sprite movements. I went crazy trying to build a 2D game with consistent speed movement of sprites and sprite sizes in relation to screen size and density (e.g. tablets vs phones). So, I decided to drop the game engines and this is how I accomplished my first recently published 2D Android game:

  1. Use drawable-nodpi for sprite images (gives sprite size consistency across screen densities and sizes)

  2. Use different layouts to support various screen sizes (e.g. layout-large, layout-xlarge, etc...)

  3. Use TranslateAnimation and ObjectAnimator to animate sprite movements across screen

  4. Use math to figure out sprites collision (e.g. screen coordinates and sprite location etc.)

  5. Use handlers and condition statements to control the game events

You can test the outcome of following the above guide to developing a 2D Android game without game engine by checking out the game. It is called Yum Yum Pow available on Google Play. The free limited version is available also on Google Play. I can only link to free apps I think, so here it is:

https://play.google.com/store/apps/details?id=com.wildroid.yum.yum.pow.limited




回答4:


If u are planning to build a simple game then stick with Basic android.If it is a big game,With out game engine your game developing will be a heavier process.if u want to use a lot of images then memmory problem will occur(OOM).if u are comfort with the game engine that will be easy for future game developing.if u are making a simple game then there is no need of game engines.

there are so many game engines available

andengine,libgdx,cocos2d..



来源:https://stackoverflow.com/questions/10311841/android-2d-game-development-without-an-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!