2012年1月15日 星期日

Android Development for Beginner: Snake


This tutorial is for the beginner and demonstrate how to implement a tradition game "Snake" using Android 4.0.3.

The source code of this tutorial are extracted from the android developer official website and we will show you step by step on how to download and run the program. (http://yp-appdev.blogspot.com/)






In this tutorial, it is assumed that you have already setup the eclipse. Please read my another tutorial if you don't know how to setup the eclipse.
Android + Eclipse Development Platform Setup

Part I. Install Android Sample Code to Eclipse
1. It is very simple. Just go to Android SDK Manager, install the "Sample for SDK" and it is done.

In this example, we've installed Samples for the latest Android 4.0.3 (API15)



Part II. Create Sample Project

1. Create New Project by "File -> New -> Other" and choose "Android Sample Project"


2. Select the target build Android 4.0.3

3. A list of sample projects will be shown and choose "Snake" to create the sample project.


4. The Snake project is created!

Part III. Start the Project

1. Create an Android Virtual Device (AVD) for Android 4.0.3.



2. In the project, right click and "Run As" -> Android Application

3. The AVD will automatically start up. It may takes several times to load and wait..

4. The Snake application is shown in the AVD! Done and enjoy!!

1 則留言:

  1. Superb Game!! Get the exact this type of game for Android from here: Worm Turns

    回覆刪除