Friday, October 29, 2010

Thursday, October 28, 2010

A Very Quick Tutorial

Images will come soon hopefully.

You might find it hard to follow along if you have never done any android programming before.

Step 1 - create a new android project using the following settings:
build target 2.2
create activity: main
min sdk version 4

Step 2 - create a new android xml file in res/values called theme_config.xml
here is what a sample theme_config looks like:


<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="red">0</integer>
<integer name="green">186</integer>
<integer name="blue">255</integer>
<integer name="fred">0</integer>
<integer name="fgreen">0</integer>
<integer name="fblue">0</integer>
</resources>


red, blue, and green are for the background color
fred, fgreen, and fblue are for the font color

Step 3 - Edit res/values/strings.xml and add your app name, so it should look something like this:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">HGTheme: Shark</string>
</resources>

Step 4 - Edit your AndroidManifest.xml file,
add this line to the android:installLocation="internalOnly"

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fkarim.hgthemeshark"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="internalOnly">


Step 5 - Edit your AndroidManifest.xml file, add in the following intent filters

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".main"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.fkarim.helicopter.THEMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.fkarim.helicopter.ACTION_PICK_ICON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

</application>

Step 6 - make your images and put them in res/drawable
you need the following images:

cavewalls.png (240 x 240)
copter.png (around 120 x 50)
obstacles.png (50 x 100)
smoke.png (32 x 32)

Step 7 - publish your app
If you need some help for how to publish an app check out this article:

make sure the name starts with "HGTheme :" so its easy for people to search for it in the market.


Thanks for making a theme for the game!

Make Your Own Themes For Helicopter Game

I have just added a new feature, the ability for anyone to make custom themes, for my first game on android. You can download the game from here if you want to try it out.

I am working on a tutorial with images and possibly video to make it easy for anyone to create a theme for the helicopter game.