Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have thought about just coding a 2D game on Android using just pure Java and the Android SDK, no engines like libdgx, cocoa-2dx attached. I don't know if I really need to use a game engine or not. Doesn't Java already come with basic libraries and APIs for most things already?

I'm not interested in the cross-platform aspect of game engines. The game is 2D, so there's no complex issues with 3D, importers, or what not. I also don't like to have to code around level editors or pre-built constructs like a character or tile class.

Given this, are there any other benefits for me using a game engine to code my Android 2D game? For example, I'm clueless with OpenGL so if I'm doing it w/o an engine I would be using pure Java, would that be significantly slower than using an engine like libgdx?

share|improve this question
Byte's answer below is the right answer, but just to add, as to your closing question, a game engine doesn't make opengl run faster, but it makes your development time faster, because you won't have to reinvent the wheel. – Cameron Fredman Mar 9 '13 at 3:49
It won't make OpenGL faster but it'll end up being faster usually because more often than not the engine is written better than you'd end up writing it. :) – Vaughan Hilts Mar 9 '13 at 5:25
What is your aim? Is it to develop a salable product as quickly as possible? Is it to boost your skills and your CV? Is it just a hobby for fun? – Den Mar 9 '13 at 17:02
My guess is on Android specifically high-level game engines could somewhat help with the terrible platform fragmentation. But I don't have such experience. – Den Mar 9 '13 at 17:04
@Den To get some experience with Android and Java, and also just as a hobby project. It would be fun to just have some hands-on making it from basics, make it polished and playable, then release it for free. – Cardin Mar 10 '13 at 6:42
up vote 3 down vote accepted

As an observation to Byte56's answer: (especially) with Android, even if you want to make just a 2D game, it may theoretically seem to suffice using the Canvas draw calls and basic Java API. Doing it like this might seem to have certain benefits to using a specialized engine, especially if you're already very familiar with Java.

The problem is, in reality you do want to use OpenGL (ES 2.0 in this case) even for a simple 2d game. First and foremost, it's a question of performance: drawing textures on quads as opposed to sprites drawn via Canvas draw calls will be literally orders of magnitude faster. Furthermore, Android imposes limitations on how many images you can load via Java & Canvas API, limitations which are not present when loading them as OpenGL textures.

So in this case, you'll benefit a lot more from using an engine to do all this as opposed to doing it by hand. Just the part where it alleviates all the boiler plate code is a big plus. For example: try making something like an OpenGL "text sprite", using only the basic ASCII characters and one single font, by hand, for OpenGL. Then try using the built in functionality for this comes with AndEngine. You have a ton more options, and the learning curve will take you a lot less time than the by-hand-coding alternative.

share|improve this answer

The benefit is pretty obvious. It saves you a lot of work. That's the purpose of the engine. Android will come with the basics, but a game engine will have already implemented a good deal of the tedious work required to create a game. Perhaps you haven't looked into it much, but there's still a lot that a 2D game requires that's not part of the base Android SDK.

As you'll hear from lots of experienced developers, make a game not an engine.

Obviously you know the requirements of you game best, so it's up to you if you want to use an engine or not. You may want to just pick and choose among the various libraries available instead of going with a full blown engine.

share|improve this answer
Animation is definitely something I'm leaving to the libraries. I think I'd try to build using just the SDK first. I feel I can't really make a decision until I really know the basics of how to do it using the SDK only, and thereby appreciate what the engine encapsulates away for us. – Cardin Mar 10 '13 at 6:47

I agree with Byte56. However, if you are building a game for the first time, designing it completely by yourself is a great way to start. This will make you clear on what are the various aspects, pitfalls, etc. in designing your game. However, once you are done with it, work on a game engine to speed up your game development cycle.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.