How to Make an Android Mobile Game ?

46,537

170

15

About: I am an enthusiastic person who does not follow reality, instead who creates reality. I am sharing some projects with amazing people across the Globe (Of course you people) and I hope you will like them.

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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..

Step 2: Initial Setup......

  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.

Step 3:

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.

Step 4:

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

Step 5:

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

Step 6:

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

Step 7:

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.

Step 8:

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

Step 9:

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

Step 10: 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.

Gaming Contest

Participated in the
Gaming Contest

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    15 Discussions

    0
    None
    Dragan123

    1 year ago

    Thank you for posting this tutorial. It's quite well explained and therefore easy to make. But, the ball doesn't bounce when it hit's the platform. Is it supposed to behave that way, or I did something wrong?

    0
    None
    raheel78

    3 years ago

    Can I run this in the studio emulator before running on my mobile? I am seeing some issues in making the project which are related to finding the image files in drawable.

    Error:Execution failed for task ':app:mergeDebugResources'.

    >/Users/raheel/AndroidStudioProjects/Pinball/app/src/main/res/drawable/FOCOTDLIM0VQGUF.MEDIUM.jpg: Error: 'F' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore.

    2 replies
    0
    None
    prayag naoraheel78

    Reply 3 years ago

    no you can't because emulator don't have gyroscope.

    0
    None
    jez350prayag nao

    Reply 3 years ago

    Hi,

    How can we get this app to run on the emulator without using an Android device?

    Thanks

    0
    None
    KrazyK4

    3 years ago

    Can you give us the finished APK file to see how its meant to be like?

    3 replies
    0
    None
    raheel78

    3 years ago

    Also, I have two images less than what you have shown on the screenshot. I have only one image for settings button, no image for play button. Seems image names and types (png or jpeg) is the issue in rendering xml resources, isn't it?

    1 reply
    0
    None
    prayag naoraheel78

    Reply 3 years ago

    download all pictures and copy & paste then in drawable folder

    0
    None
    dinesh19960

    3 years ago

    i have right clicked on the images ,clicked copy and pasted in drawable but nothing happenned

    1 reply
    0
    None
    prayag naodinesh19960

    Reply 3 years ago

    from where you are trying to copy,from website or from your computer after downloading ?

    0
    None
    raheel78

    3 years ago

    Hi, I am unable to download the code files? Can you please check? Also, the steps for android file resource addition are not detailed, seems you have written this for someone expert at android!

    1 reply
    0
    None
    prayag naoraheel78

    Reply 3 years ago

    Hi

    now you can download files from google drive.

    0
    None
    Jafhar12

    3 years ago

    You should used a game engine this would have been a lot easier for you