114
\$\begingroup\$

I am new to game development. I am interested in developing 2D games for the Android platform. What is the best place to start with (i.e) What are the basics and how to proceed? I already have programming experience in Java but don't have any experience with graphics or animation.

\$\endgroup\$
8
  • \$\begingroup\$ Please make your question (title) slightly more descriptive. \$\endgroup\$
    – Ricket
    Aug 31, 2010 at 12:59
  • 1
    \$\begingroup\$ Do you have experience with Android? \$\endgroup\$ Aug 31, 2010 at 13:03
  • 3
    \$\begingroup\$ @Ricket or we could do it for him :) \$\endgroup\$ Aug 31, 2010 at 13:03
  • \$\begingroup\$ I am curious on whether OpenGL, while faster, drains more battery than regular 2D using surface view or whatever other method. Does anyone know an answer? \$\endgroup\$
    – M Rajoy
    Apr 30, 2012 at 14:43
  • \$\begingroup\$ You'll have to pick one game engine and one game idea to get your hands dirty. AndEngine seems to be a nice fit for 2D games and Flappy Bird is the new 'Hello World' in game development. Check out this tutorial on Flappy Bird in Android using AndEngine. Cheers! \$\endgroup\$
    – appsroxcom
    Sep 8, 2014 at 17:46

7 Answers 7

83
\$\begingroup\$

Android might not be the best choice for starting game development because you would be learning several different things at the same time (Android SDK, making games, optimization, different phone models, etc.). Consider making some simple Java games on your computer to get familiar with making games in general; this tutorial looks like a good place to start.

Once you're comfortable with both Java and game development, start with the Android tutorials. The development guide is very useful, in particular you need to know Android fundamentals and activity life cycle, as well as graphics. Get the Android samples and check out the Lunar Lander and Snake game samples (there's also JetBoy, but that's focused on the JetPlayer).

The canvas class is actually good enough for most 2D games, but if you need better performance or want to move to 3D graphics later you will have to learn OpenGL ES. However, this is beyond the scope of getting started (unless you already know OpenGL).

\$\endgroup\$
4
  • \$\begingroup\$ Exactly what I was looking for. Thanx @Firas Assaad \$\endgroup\$ Aug 31, 2010 at 15:14
  • \$\begingroup\$ Another good resource is the book Hello, Android which explores making a Sudoku game over several chapters, including drawing using canvas and handling user input. There's also a chapter on 3D graphics that builds a textured rotating cube. \$\endgroup\$ Aug 31, 2010 at 19:27
  • \$\begingroup\$ I have just moved from BlackBerry to Android game dev and I want to throw my hat in with Firas: the Canvas class offers more than enough performance for a 2D game. There is no need to add the extra complexity of OpenGL when you start. \$\endgroup\$
    – ADB
    Sep 4, 2010 at 12:25
  • \$\begingroup\$ I agree with this answer, but Android isn't the worse place to get started! My very first programming project was a comic book viewer. Then, I made a puzzle game, and now I'm making a 2D game with OpenGL ES 2.0 graphics. I've learned on one heck of a curve, but in the last 9 months, Android has helped me get a good foundation in Java, SQLite, and OpenGL along with a great start with OOP and game development concepts. I could have done worse than learning how to program with Android. \$\endgroup\$
    – Amplify91
    May 30, 2011 at 19:51
66
\$\begingroup\$

There are lots of results at Stack Overflow for android game. Lucky for you, I went through all of them and picked out the relevant ones to your question.

\$\endgroup\$
3
  • \$\begingroup\$ This post on using AndEngine to create Flappy Bird clone is awesome too! \$\endgroup\$
    – appsroxcom
    Sep 8, 2014 at 18:29
  • 1
    \$\begingroup\$ The first two links are broken, they are available anymore \$\endgroup\$
    – Fahim
    Mar 29, 2015 at 16:56
  • \$\begingroup\$ Tragic. They were full of such quality content too. \$\endgroup\$
    – Ricket
    Mar 31, 2015 at 0:56
18
\$\begingroup\$

If you're already familiar with Android and doing basic UI applications with it, then you'll want to take a look at this multi-part tutorial that explains drawing graphics to an Android screen.

\$\endgroup\$
1
  • 5
    \$\begingroup\$ the link appears to be broken - perhaps the site exists no longer \$\endgroup\$
    – Nasir
    Jan 5, 2013 at 1:51
4
\$\begingroup\$

All of these are really good answer. But I am a little surprised that no one has mentioned jMonkeyEngine yet.

Its java, its shader based, its super easy to begin with, very good documentation, awesome community, fast bug fixes, comes with a game development enviroment(jMP based on NetBeans platform) & its evolving very very fast.

I would emphasis more on it because, game development and making a library that someone will be using to make a game is quite different. So, if you want to make a game not a game engine, just jump right in jMonkey Engine with your eyes closed. :)

\$\endgroup\$
2
  • \$\begingroup\$ I did a quick google search about jMonkeyEngine and Android. I presumed that as Android uses it's own Java interpreter that jMonkeyEngine wouldn't work on it. It's still Java though, so maybe they would have made a port. In any event, a minute of research implies that it's a work in progress. \$\endgroup\$ Jul 28, 2012 at 1:00
  • \$\begingroup\$ jME works on android, there are several projects on the store. I suggest you, posting in their forum for technical specifications. \$\endgroup\$ Jul 28, 2012 at 1:22
3
\$\begingroup\$

Processing.org is another good place to start for (somewhat simplified) coding/development before diving into the Android SDK. It works on Max/Windows/Linux and has a version developed specifically for Android deployment. I highly recommend it - as long as you have an Android phone you can deploy games/apps to your phone that you make with that version of Processing. Hope it helps.

\$\endgroup\$
4
  • \$\begingroup\$ You can also publish to the Android market as of the latest version, although I have not tried. \$\endgroup\$
    – gary
    Aug 31, 2010 at 22:12
  • \$\begingroup\$ I have heard that Processing has performance issues with Android, is that true? \$\endgroup\$ Sep 1, 2010 at 2:42
  • \$\begingroup\$ I haven't tried enough different things to give a well-backed true/false answer. My programs seem to behave fine on Android. I'd say search the web, search processing's android forum, etc... Or just try it out. ;) \$\endgroup\$
    – gary
    Sep 1, 2010 at 3:29
  • \$\begingroup\$ Ok, I'll check that out @gary comtois \$\endgroup\$ Sep 2, 2010 at 3:22
2
\$\begingroup\$

I am also new to android game development, and I find the open source game engine AndEngine a pretty good tool to start with. It's got a bunch of examples and a fairly active community.

http://www.andengine.org/

\$\endgroup\$
0
\$\begingroup\$

I strongly recommend the Airplay SDK as it works on windows and deploys to most smart phones. They also have a great Indie license.

\$\endgroup\$
2
  • \$\begingroup\$ I'm a Java developer, seems Airplay SDK is a C++ / XCode SDK? \$\endgroup\$ Sep 1, 2010 at 2:43
  • \$\begingroup\$ Airplay SDK is Marmalade SDK now. It has separate SDKs for C++, Lua, HTML5 and Objective C \$\endgroup\$
    – noob
    Nov 19, 2013 at 17:31

Not the answer you're looking for? Browse other questions tagged .