How to Make an Android Mobile Game ?

by prayag nao in Circuits > Mobile

66384 Views, 177 Favorites, 0 Comments

How to Make an Android Mobile Game ?

Screenshot_2016-03-21-17-20-46_com.RoboKon.pinball.png
Screenshot_2016-03-21-17-20-52_com.RoboKon.pinball.png

A game is structured form of play, usually undertaken for enjoyment and sometimes used as an educational tool.Playing games help us grow, think, and find solutions to problems.

So Today i am going to make a game for android mobile.

Note:This game will work with moblie phone having 5.5" screen and Android OS.

Things You Will Need...

  1. A computer or laptop having android studio installed on it.
  2. A little knowledge of Java programming.
  3. Basic knowledge of Android studio.
  4. latest version of JDK (java development kit) and JRE installed on pc..

Initial Setup......

Screen Shot 2016-03-21 at 4.00.14 pm.png
Screen Shot 2016-03-21 at 4.00.52 pm.png
Screen Shot 2016-03-21 at 4.01.15 pm.png
Screen Shot 2016-03-21 at 4.01.53 pm.png

  1. open android studio.
  2. Click on new project.
  3. Now put application name "Pinball" and click next.
  4. Select minimum SDK and click next.
  5. Now click on blank activity and click Next.
  6. Now click on finish button.

Screen Shot 2016-03-21 at 4.02.24 pm.png
settingup.png
start.png
play.JPG
ball1.png
ic_launcher.png
hiscore.jpg
Screen Shot 2016-03-21 at 4.04.51 pm.png

Now a window will open.Now you can see a directory/folder named "res" on top-left side.

Now copy all images of this step and put into res=>drawable folder in android studio.

Screen Shot 2016-03-21 at 4.05.38 pm.png
Screen Shot 2016-03-21 at 4.06.17 pm.png

Open MainActivity.java flie and delete highlight text on image.

Screen Shot 2016-03-21 at 4.12.28 pm.png
Screen Shot 2016-03-21 at 4.14.37 pm.png
Screen Shot 2016-03-21 at 4.19.46 pm.png

Now open Content_Main.xml and put 3 image view in mobile show in figure or you can download just given programme and copy into Content_Main.xml file.

If you are not able to download file than you can download from here Google Drive

Downloads

Screen Shot 2016-03-21 at 5.08.38 pm.png
Screen Shot 2016-03-21 at 5.09.02 pm.png
Screen Shot 2016-03-21 at 5.10.09 pm.png

Now just make 4 more java classes according to shown in picture.which are named follow:

  1. About.
  2. Game.
  3. Hiscore.
  4. setting.

Now just copy given programme into correspondence file.

put

MainActivity.docx => MainActivity.java

About.docx=> About.java

Game.docx=> Game.java

Hiscore.docx=> Hiscore.java

Setting.docx => Setting.java

Note:If you are not able download files then you can download from here Google Drive

Screen Shot 2016-03-21 at 5.27.02 pm.png
Screen Shot 2016-03-21 at 5.29.31 pm.png

Now we have to make xml files.

so goto res=> layout and right click and goto new => layout resource file.

repet same process and make 5 xml files named:

  1. about.
  2. game.
  3. hiscore.
  4. hiscore2.
  5. setting.

Now just download give files and copy & paste into appropriate xml file.

about,game,hiscore,hiscore2,setting.

about.docx=>about.xml

game.docx=>game.xml

hiscore.docx=>hiscore.xml

hiscore2.docx=>hiscore2.xml

setting.docx=>setting.xml

Note:if you are unable to download these file you can download from here

Screen Shot 2016-03-21 at 5.46.03 pm.png
Screen Shot 2016-03-21 at 5.50.00 pm.png
Screen Shot 2016-03-21 at 5.46.20 pm.png

Now make raw folder under res file as show in fig.

after making raw folder copy given mp3 file into it.

Note:if you are unable to download these file you can download from Google Drive

Final Step

Now just connect phone to your PC and click on run application,this will install game into your mobile phone and enjoy it.

you can download given apk file.

if you have any query pls comment belw

Note:This game will work with android moblie phone having 5.5" screen.


If you liked it please don't forget to vote.

Downloads