bootstrap responsive templates

Creating an Andoid app "Relax Melodies Clone" in Coppercube

In this tutorial we will be going to create a simple yet satisfying clone of the Relax Melodies app. It is an app which contains relaxing sound fx and music.

Step 1

Setting Up The Android Environment

First of all we need to download Android studio or SDK tools and then we need to install android platform and build tools.
Then we have to download java jdk and set directories for them in coppercube directories settings.
Link to download Android Studio: https://developer.android.com/studio/
Link to download JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html


Also you have to create a keystore file in the sdk directories settings.



Step 1

Step 2

Getting Resources And Importing In Engine

As for this tutorial we are going to create a clone of relax melodies app. we are going to extract the resources from the original app itself. It contains textures and music too. To extract the resources open the apk in any zip explorer or with winrar and extract the resources folder.
Link to Relax Melodies Original Apk: https://play.google.com/store/apps/details?id=ipnossoft.rma.free&hl=en_IN
Once you will have resources then Import them in the Engine. 

Step 2

Step 3

Applying Textures And Creating 2D Assets

We have our textures (resources) imported now we have to convert them into real asset to use in our Clone App.
First of all we need to know the resolution of the texture of the item we are going to add in our App. "Distant Train" for example has a resolution of 176X144. 

Step 3

So what we gonna do is to create a plane mesh of height  176 and with a width 144  and then we have to apply the texture for Distant train_normal to the planemesh. Rename the planemesh to Distant train. Do the same thing for other Icons (items) or backgrounds. Select the texture, get the resolution and create planemesh according to that resolution, apply the texture and rename it.

Note:- You can merge meshes to make them one to work with ease. I have merged "puck" with icons and then made clone of them and changed textures accordingly. For better undesrtanding refer to the provided CCB file.

Step 3.2

Step 4

Placing The Objects

Once we are done with converting textures into meshes. we are going to place the background objects, Ropes and all other obejcts to their positions. 

Step 4

Step 5

Creating And Setting Variables

To make our app responds correctly and execute actions when specfic icon is clicked and to make the icon as a switch we need to create variables. so we will add behavior to our root secene node "before starting the scene do something" and then we will be going to set new variable for each and every icon we are going to use as a swtich. for example Variable name "distanttrain" and we will set its value to zero.

Step 5

Step 6

Animating Game Objects And Adding Behaviors

We have placed the background,ropes and all other Objects to their position. Now we need to animate them.
To animate our meshes we are going to use an inbuilt Coppercube Action CHANGE A TEXTURE. We are going to add this behavior only if a variable is true. For example if a variable "distanttrain" is zero then do Something. And Then we will change the texture using the change a texture behaviour and also rotate it. wwewill do all of  other work like playing sound within this "If a vraible is true then do something Action"
we will be going to use distant train sound to play when clicked on the icon.
also we will have a "do something later" action added to this to make a switch.

Step 6

Step 7

 Making the Switch Works

To make the switch we need to add another "if a varaible has value then do something behaviour" to our mesh but this time with diffrent value 1. to make this switch work we will have to attach an action "set/change value of a variable", to the previous "do something later" action. and change the value of variable distant train to 1. now we will use this variable to revert back the changes done by the previous behaviour like playing of sound,rotation of icon and changing of texture. and then setting the variable again to zero after a few seconds.

Step 7

Step 8

Rotation of the Icon

Rotation of the icons is quite complicated that it can not be explained using words. To get the effect of pendulam or occilating rotation we will use every few seconds do something behaviour and a vraible "rotation_distanttrain", if a vraible has value then every few seconds rotate the object by absolute rotation.
for better understanding go throught the CCB File provided.

Step 5

Step 9

Adding Camera


Add a simple camera to your scene and test the app.

Step 5

Step 10

Publishing as Apk

To publish the app or game as apk First you need to create a keystore file. To create a keystore file go to publishing setting and click on set android sdk and create a new keystore file.
To edit the package name and icon of your apk file. you can change the publishing settings for android target. You can also change the orientaion to landscape or portrait for your apk within the publishing settings.
Once you have apllied the publishing setting then connect your android device with usb debugging enabled and click on tools and then publish as apk. 
Note:- ADB drivers must be installed on your pc to directly install the apk on your android device.
Otherwise you can copy the generated apk file to your sdcard and then install it manually on your device.

Step 5

Step 11

Conclusion

Hurrah!! we just completed cloning the Relax melodies App. In this tutorial I have skipped a lot of details. but i have tried to cover all the major parts, and have also provided the link to a ccb file which may clear more doubts.
CCB file doesn't contain the complete App Design. it covers all the major part. e.g. playing and stopping of music, and a clear button to stop global sound, etc etc.

TroubleShooting

 If you have any issue and problems regarding this tutorial, just ask me it in the Comments section.

Links

CCB Template and Resources

Here is the url to download CCB template of this tutorial and resources used in this clone.
Resources
CCB Template and Apk

FACEBOOK COMMENTS WILL BE SHOWN ONLY WHEN YOUR SITE IS ONLINE

SHARE THIS PAGE!

Address

Jaipur, RJ 302016

Contacts

Contact us
beingneophyte@gmail.com