Search code examples
androidgame-enginegame-physics

Which framework should i use for building Android games?


I know i should google this out, but i have tried that with no successful answers. Can someone please guide me or suggest me what i should be doing to develop android game (which has actions like throwing a ball, etc) i have already developed an application called Grepocket) but i am new to the game development. So me help me out guys!


Solution

  • There are sooo many to choose from :) For versions of android with hardware accelerated canvas (ICS and forward?), it sounds like a good match, but if you target older ones OpenGL may be of interested. With OpenGL you can choose from 1.1 or 2.0, where I would say 1.1 is easier for beginners and 2.0 is more powerful. Most devices support 2.0 these days. Then you have to decide which language to use for OpenGL. You can choose from Java, RenderScript and C/C++. Java provides the easiest system integration and is easier to develop in for many. RenderScript is portable between different android targets. C/C++ should give the best performance if you do it right, and you may have an easier task to port to other platforms. Finally you could do it in a webview and get portability over several platforms.

    In additions there are several frameworks to choose from including gwt, playn, unity, ... I played with playn a while ago and found it rather incomplete.

    Many games today use physics engines. Box2D is very popular. If you need 3D I would consider Bullet, but there are many more. If you are adventurous you can implement your own for example using verlets.

    I wrote a small game a while ago for a course I gave. I found using a canvas was the best alternative for me even though it was not hardware accelerated. In the game I used JBox2D for the physics. It worked like a charm :)

    This given, there are many ways to do this. If this is your first game you should focus on simplicity. Use tools that you know, so that you can focus on the game. Don't bother about performance before it becomes an issue (don't do stupid things though ;)). Watch some of the Google IO talks on the topic (they are all on youtube). They provide tons of valuable info.