[TUTORIAL]Theme for Helicopter Game with screnshots


Last Updated:

  1. HGDev

    HGDev Active Member This Topic's Starter

    Joined:
    Oct 24, 2010
    Messages:
    40
    Likes Received:
    5
    Here is an official tutorial for how to design a theme for "Helicopter Game" which is available in the market.

    [​IMG]
    [​IMG]

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

    Step 2 - create a new android xml in res/values called theme_config.xml

    [​IMG]
    [​IMG]

    Fill in these details

    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <resources>
    4. <integer name="red">0</integer>
    5. <integer name="green">186</integer>
    6. <integer name="blue">255</integer>
    7. <integer name="fred">0</integer>
    8. <integer name="fgreen">0</integer>
    9. <integer name="fblue">0</integer>
    10. <bool name="randomSmoke">false</bool>
    11. </resources>
    12.  
    red, blue, and green are for the background color
    fred, fgreen, and fblue are for the font color
    randomSmoke is a boolean (if true it will rotate the smoke particles randomly - set to true by default)

    [​IMG]


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

    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <resources>
    4. <string name="hello">Hello World, main!</string>
    5. <string name="app_name">HGTheme: Shark</string>
    6. </resources>
    7.  
    [​IMG]

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

    Code (Text):
    1.  
    2. <application android:icon="@drawable/icon" android:label="@string/app_name">
    3. <activity android:name=".main"
    4. android:label="@string/app_name">
    5.    <intent-filter>
    6.     <action android:name="android.intent.action.MAIN" />
    7.     <action android:name="com.fkarim.helicopter.THEMES" />
    8.     <category android:name="android.intent.category.DEFAULT" />
    9.    </intent-filter>
    10.    <intent-filter>
    11.     <action android:name="com.fkarim.helicopter.ACTION_PICK_ICON" />
    12.     <category android:name="android.intent.category.DEFAULT" />
    13.    </intent-filter>
    14. </activity>
    15.  
    16. </application>
    17.  
    [​IMG]


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

    cavewalls.png (240 x 240)
    roof.png(240 x 240) - optional if you want a different colored cave ceiling
    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:
    http://www.devx.com/wireless/Article/39972/1954

    make sure the name starts with "HGTheme :" (and should have "helicopter game theme" in the description for now) so its easy for people to search for it in the market.


    Thanks for reading the tutorial. I will be posting an example theme soon with the source code also.
     

    Advertisement
    nyydynasty likes this.
  2. nyydynasty

    nyydynasty Well-Known Member

    Joined:
    Sep 13, 2010
    Messages:
    956
    Likes Received:
    171
    what if i wanted to make the bottom wall different from the top wall (lets say buildings for the bottom and clouds for the top)? or does it have to be the same image for both?
     
  3. HGDev

    HGDev Active Member This Topic's Starter

    Joined:
    Oct 24, 2010
    Messages:
    40
    Likes Received:
    5
    At the moment they are the same, but I will change that and post an update here :D
     
  4. HGDev

    HGDev Active Member This Topic's Starter

    Joined:
    Oct 24, 2010
    Messages:
    40
    Likes Received:
    5
    I've added the feature into the game now. If you add an extra image called "roof.png" it will use that as the roof and use "cavewalls.png" as the floor. If you don't include roof it will automatically use cavewalls for both the roof and the floor.
     

Share This Page

Loading...