share
Game Development2D Gaming Libraries/ Frameworks/ Engines for Android
[+88] [15] Bryan Denny
[2010-07-14 19:41:49]
[ 2d android ]
[ https://gamedev.stackexchange.com/questions/89/2d-gaming-libraries-frameworks-engines-for-android ] [DELETED]

Are any such things available to help me build my Android game?

[+61] [2010-07-29 09:00:25] Ellis

EDIT: PSA: Keep in mind this answer was written in 2012, and 3 years later, a lot more of engines exists, and lots of them are made purely for mobile devices. Don't take this answer for granted and search google for more recent engines.


I port Irrlicht on Android and use it for 2D games. It is not the best solution but I have strong performances. I tried many Java Frameworks but the Garbage Collector can lag your games during 0.2s on G1 phone... So the framework should do allocation very carefully.

Commercial C++ frameworks:

  • unity3D [1]: very good (available on Android, iOS, Web, Windows, OS X) [Game: Rocket Bunnies]
  • Unreal Engine [2] (commercial): the best engine but not for beginners [Game: Dungeon Defenders]

Open Source C++ frameworks:

  • SDL [3]: probably best C library for game dev, open source and cross platform (mobile included)
  • Ogre3D [4]: the best open source 3d engine but it is a large framework
  • Irrlicht [5]: good performance, light framework [Game: Moblox]
  • Linderdaum Engine [6]: open source for Windows and Android
  • Cocos2d-x [7]: open source cross platform

Java Open Source Frameworks:

  • LibGDX [8] : Open Source, Very Popular, Supports multiple platforms, Support for Tiled, Box2D and other, Good Documentation
  • AndEngine [9] (Open Source): good performance. For documentation, look examples and read source code; but it is the Free library to begin a game project [Game: Drop Block]
  • cocos2d [10] for Android: Garbage Collector problem
  • rokon [11]: good performance and designed for mobile but project seems dead.

Physics Engine:

  • box2d [12] (OpenSource): fast and easy
  • jbox2d [13] (OpenSource): so slow on Java that I made a JNI wrapper with SWIG to use native box2d (AndEngine does the same)
  • chipmunk [14] (OpenSource): fast but I prefer box2d
  • bullet [15] (OpenSource): excellent 3D engine

Warning, with Froyo and JIT, Java libraries perform much better. But the Garbage Collector problems are always valid. With Gingerbread, the garbage collector is continous so no problem.

[1] http://unity3d.com/
[2] http://www.unrealengine.com/
[3] http://www.libsdl.org/
[4] http://www.ogre3d.org
[5] http://irrlicht.sourceforge.net
[6] http://www.linderdaum.com
[7] http://cocos2d-x.org/
[8] https://libgdx.badlogicgames.com/index.html
[9] http://www.andengine.org/
[10] http://code.google.com/p/cocos2d-android/
[11] http://code.google.com/p/rokon/
[12] http://box2d.org/
[13] http://www.jbox2d.org/
[14] http://code.google.com/p/chipmunk-physics/
[15] http://bulletphysics.org/

(1) I'd also like to add cocos2d-x, it is on the MIT license and works on both Android, iOS, and Windows Phone. I believe this is different than what was mentioned above since this one is specifically in C++ not Java. - Jamornh
AndEngine borrows the box2d wrapper from libgdx. - Matsemann
(6) Unity3d is not C++. It supports C#, a Javascript dialect and boo - lhk
You can definitely do it through native if you wanted to as well. The guys who made Tiny Words did jmoses.co/2014/10/23/… - John Moses
(1) SDL is not Java; it's C. The Java you may have experienced is a wrapper/bindings that calls into the C code. None of the engine's functionality happens in Java. - Slipp D. Thompson
1
[+24] [2010-12-29 10:16:44] grayger

I am surprised that nobody mentioned libgdx. http://code.google.com/p/libgdx/


libgdx and AndEngine are best for 2d, here you can find some more link - michael
@michael AndEngine forum tutorial sticky: just use a fork of a fork of AndEngine ... a lot of trouble, bugs. I don't recommend to learn it from there. - matheszabi
2
[+11] [2010-07-21 19:56:09] cstack

AndEngine [1] is pretty new, but it is open source and looks promising.

Self-description:

Free Android 2D OpenGL Game Engine. AndEngine is developed by Nicolas Gramlich.

[1] http://www.andengine.org

(1) I've done a little experimenting in this, coming from Cocos2d on iPhone, and it seems pretty nice so far for sprite based 2d games. The project seems active and has a decent forum community around it. - Matt Guest
About AndEngine... I started making a pretty basic game and after a while I started finding negative review about AndEngine especially its performance with lots of sprites. So, I did a test and added 20 sprites to my game while still in early dev. I did everything "by the book" and it nearly murdered my HTC desire Z. Pretty disappointed and switching to LibGDX. - user6484
@AscensionSystems I don't know what you did there, but I know you were doing it wrong. With a Desire Z you can easily have hundreds of moving Sprites on the screen. Simply run the benchmarks in the examples and you'll see how to do it right. - Nicolas Gramlich
Thanks Nicolas I appreciate the fact that you're "sticking up" for your engine but frankly I wasn't doing anything wrong. It has something to do with android and a bug with VBO's calls also triggering the GC. I could get andengine working fine by disabling VBO's but that also made my phone get so hot it would glitch out after about 5 minutes of play. I had the same issue with libGDX, so I wrote my own engine in C++. Also you can't get "hundreds" on the screen using the examples app. I could get about 90 128x128, 2 "frame" animated physical sprites before it would lag with your engine. - user6484
(continuted)... in my engine I can get 170, 512x512, 16 "frame" animated physical sprites on the screen before I see my framerate even start to dip below 60 fps. - user6484
3
[+8] [2010-07-14 19:51:50] arielsan

I think you could use the game Replica Island [1] from Chris Pruett [2] as an example of a 2d game. I think it is supposed to be a base for other games as it is explained in this video [3] from the Google I/O 2010. You could watch the game here [4].

[1] http://code.google.com/p/replicaisland/
[2] http://replicaisland.blogspot.com/
[3] http://www.youtube.com/watch?v=7-62tRHLcHk&feature=player_embedded
[4] http://replicaisland.net/

Yeah, thats a good video, definitely worth a watch especially when he talks about efficiency. - Spidey
4
[+7] [2010-07-14 20:13:57] Bryan Denny

Unity3D (which can technically be used to make 2D games) is "coming soon" for Android: http://unity3d.com/


Yup I totally agree. Secondly, if you pay for Unity3D licenses, you can publish same work for multiple platforms. So you start with FREE WINDOWS/MAC licens. Learn the program. Then upgrade the licens to what ever platform you see fit first. Currently Android though, is only PRO edition which means you need Unity3D PRO + Android PRO = $3000... - BerggreenDK
Having made 10-15 2D games using Cocos2D for iOS, I made one using Unity 4.6 and it was an awful experience, slow and buggy - for iOS - can't say anything about performance for other platforms.. While 4.6 improved quite a lot working with 2D stuff since earlier, it's nowhere near a dedicated 2D rendering engine like Cocos2D or probably most other. Performance is awful and they are still fighting with iOS 64 bit support. That said, of course the multiplatform strength is the biggest... strength. - Jonny
5
[+5] [2010-07-14 21:24:56] Firas Assaad

cocos2d for Android [1] is based on the iPhone cocos2d [2] library. I'm not sure how usable it is at the moment but it's worth checking out.

[1] http://code.google.com/p/cocos2d-android/
[2] http://www.cocos2d-iphone.org/

6
[+4] [2010-07-14 20:08:27] Spidey

Rokon [1] looks pretty good, haven't tried it myself but it seems pretty active.

[1] http://rokonandroid.com/

7
[+4] [2010-07-28 23:06:59] Adam Harte

androidbox2d [1] is the android port of Box2D. Box2D is a feature rich 2d rigid body physics engine.

[1] http://code.google.com/p/androidbox2d/

8
[+4] [2010-07-29 00:38:45] Mason Wheeler

There's an Android port of SDL [1] currently underway, and SDL is probably the best 2D graphics framework out there. It was designed by one of the leads at Blizzard, so you know some real expertise in game building has gone into it.

[1] http://libsdl.org

9
[+3] [2011-08-21 03:57:49] Eliezer

Slick2D [1] and GOLDEN T GAME ENGINE [2]

[1] http://slick.ninjacave.com/
[2] http://goldenstudios.or.id/products/GTGE/

+1 for Slick2D -- I've done a little bit with it and it seems pretty solid. The developer has released a couple of Android games based on it, too. - mrohlf
10
[+2] [2010-07-29 08:37:06] knight666

I'm working on an open source 2d game engine called YoghurtGum [1] which is supposed to be for both Windows Mobile and Android. However, porting the whole thing to Android C++ has proven extremely hard.

This is most unhelpful answer ever, I'm well aware.

[1] http://code.google.com/p/yoghurtgum/

11
[+2] [2010-07-29 16:15:39] Kyle Rodgers

If you fancy developing in AIR for Android then you could use Flash. Flash itself doesn't have any game specific features, really, but thanks to Flash's success on the web there are a huge amount of 3rd party libraries for it especially designed for games.

Some of the more popular 3rd party frameworks for games in Flash include Flixel (http://flixel.org/) and PushButtonEngine (http://pushbuttonengine.com/), which are fully designed for game development. Flash also has a version of Box2D (physics engine mentioned above - http://box2dflash.sourceforge.net/) and there are various 3D libraries, such as Papervision (http://code.google.com/p/papervision3d/) if you want to go down that road in the future.

The main disadvantage of developing in AIR, though, is that I'm pretty sure that you'll need to target Froyo 2.2 or later, though, so older handsets will get left out.


In addition to AndEngine, I've been playing with the AIR for Android Betas, and they are pretty nice, if a little slow. I think it'll work well for strategy games, or action games without too many elements. I've been working with the beta on 2.1 though, so the final release on 2.2 might be significantly fast, I'm not sure yet. Definitely something to watch. - Matt Guest
12
[+2] [2011-06-28 08:38:57] Gabriel

SIO2 Game Engine. Just released a new version with full Android Support. You can build 2D and 3D games using it and port between different platforms. http://sio2interactive.com


13
[+1] [2011-09-26 06:31:50] Steve Tranby

Cocos2D-x [1] is a port of Cocos2D for iPhone [2] written in C++ targeting the Android NDK [3] and is actively being developed to achieve feature parity with the iPhone version. It won't have garbage collection issues, and you will get a relatively easy port to iOS, Win32, and probably eventually OSX in the near future.

[1] http://www.cocos2d-x.org/
[2] http://www.cocos2d-iphone.org/
[3] http://developer.android.com/sdk/ndk/index.html

14
[0] [2011-08-30 17:34:07] samskivert

PlayN [1] is a multiplatform 2D game framework that targets Android in addition to HTML5, Flash and JVM. It is somewhat new, but was used to write the HTML5 implementation of Angry Birds, and has a reasonably active community.

[1] http://code.google.com/p/playn

15