|
Coding an Android Game
2012-04-23 21:45 By Jason Birch
Final part in a series of how to code articles. Demonstrating coding an Asteroids Clone game with various technologies. This example using Java and OpenGL, implementing as an application on Android operating systems.
In this article I have converted my Asteroids Clone code into Java using OpenGL as an Android app. I am now publishing the source code here under the GNU General Public License License as a series of articles describing how to write code using various technologies.
The code here can be freely distributed, but only on the condition that a credit to Jason Birch is maintained in the source code files and running application.
The app using the Android graphics primitives can be downloaded directly to an Android device here.
The app using OpenGL can be downloaded directly to an Android device here.
An OpenGL version of the app using 3D objects will be available to download here at a later date.
As the application has already been converted to Java in a previous article, this article describes how to set up an Android development environment. You will then have all the code necessary from the previous article, to complete the application you will need to refer to the Android SDK documentation in order to adapt the user controls for the application. The Android versions of graphics and sound classes are very similar to the standard Java classes.

App Running On Android SDK Emulator
Required Environment
The Android SDK is required and can be downloaded here.
The Eclipse IDE is can be downloaded here.
The Eclipse Android plug-in can be downloaded here.
Writing Code
The Eclipse IDE is the best environment to develop an Android application and provides many facilities to simplify and make the development process easier.
Compiling Code
The Eclipse IDE will compile the code automatically using the command line programs which come with the Android SDK.
Distributing Application
The Eclipse IDE generates an apk file which can be distributed to an Android device using the Android SDK.
Running Application
The Android SDK comes with an emulator for running and debugging applications locally. The apk file can be downloaded onto an Android device and run from an application icon.
|
|
|
|