Simple Game in Android

Operating System

The is simple game developed in eclipse compatible with all screen resolution using getwidth() and getheight() function -Highscore page added
-Volume control page
In this game the player collects the coins by jumping and makes score.

More tips:http://hackfi.blogspot.com

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Submitted byAnselmo Gabriel (not verified)on Tue, 03/04/2014 - 13:11

In reply to by editfy

I cannot see the "download code" button above the "t,g+,fb like" help please. thanks
Submitted byKIM HONG (not verified)on Wed, 02/12/2014 - 14:11

I can not download this application, why?
Submitted byDMK developer (not verified)on Sun, 06/22/2014 - 13:16

In reply to by KIM HONG (not verified)

click the download button. or if u wanted to play this game on phone try to download using ur phone and install the apk file from file manager.
Submitted bykaramjeet kaur (not verified)on Wed, 02/19/2014 - 11:54

how we run this app on the pc................
Submitted byAmado (not verified)on Tue, 03/04/2014 - 10:34

Hello my friend Thank you for uploading this coude Can you advice how to restart the game once it finish? I have tried to set health =0 and score=0 when pressing a new button on ontouch event when game over but background wont restart and music wont play again

add this code into "onTouchEvent" function
  1. // restart game
  2. if(getx>91&&gety<25)
  3. {
  4. if(health<=0)
  5. {
  6. gameLoopThread.setPause(0);
  7. health=100;
  8. score=0;
  9. }
  10. }
and This line into gameover part canvas.drawText("Restart", 91, 25, myPaint);
Submitted byAJIL (not verified)on Tue, 03/04/2014 - 20:34

Hi, I'll be creating an android typing game.. I am new to android programming.. Can you give me an idea on how to start doing it? Thank you so much.. :) Thanks for this source code by the way.. :)
Submitted byJozef (not verified)on Thu, 03/13/2014 - 01:37

How to increase jump >
Submitted byeditfyon Fri, 03/21/2014 - 16:36

In reply to by Jozef (not verified)

for high jump change this code to
  1. // for jump
  2. canvas.drawBitmap(run2, sx/16, 3*sy/4, null);
To
  1. canvas.drawBitmap(run2, sx/16, sy/2, null);
in both the places
Submitted bymsainath (not verified)on Mon, 03/17/2014 - 17:38

can i get a small project on android to find colours for kids? its like basic combination of colour finder, like red and green = brown. simple one  
Submitted byarhan (not verified)on Mon, 03/24/2014 - 10:37

hi there, is this game is open source? may I publish it to play store? regards
Submitted byMak Paul (not verified)on Mon, 03/24/2014 - 22:43

Hi I'm trying to make a word construction game from a series of moving letters, I'm trying to make a thread which would search the a word from the dictionary whilst the main thread continues to run. Can you help me to link the 2. Your help is greatly appreciated
Submitted byasker (not verified)on Tue, 03/25/2014 - 18:42

if(x%2==0) { canvas.drawBitmap(run2, sx/16, 3*sy/4, null); //score if(cspeed=sx/16) { if(sound==1) { takecoin.start(); } cspeed=sx/2; score+=10; } } else { canvas.drawBitmap(run2, sx/16, 3*sy/4, null); if(cspeed=sx/16) { if(sound==1) { takecoin.start(); } cspeed=sx/2; score+=10; } }
Submitted byeditfyon Wed, 03/26/2014 - 01:29

In reply to by asker (not verified)

This is more coding You can replace the all above code with this code
  1. canvas.drawBitmap(run2, sx/16, 3*sy/4, null);
  2. if(cspeed<=sx/8&&cspeed>=sx/16)
  3. {
  4. if(sound==1)
  5. {
  6. takecoin.start();
  7. }
  8. cspeed=sx/2;
  9. score+=10;
  10. }
Thanks for suggestion
Submitted bydexy (not verified)on Tue, 03/25/2014 - 19:19

Can you paste download link here ...i cant see the download link above
thoes like buttons

Hi! The game works great on a 10 inch screen, however on a 7 inch the background runs out, the coins don't appear and the hit points don't work. Does this have to do with the size, of sx and sy? Is there a change I can make? Thanks for the help :)
Submitted byJaked (not verified)on Thu, 04/03/2014 - 10:15

Hi! The game works great on a 10 inch screen, however on a 7 inch the background runs out, the coins don't appear and the hit points don't work. Does this have to do with the size? Is there a change I can make? Thanks for the help :)
Submitted byrogamenon Sun, 04/06/2014 - 06:10

Download link doesn work. Can you provide new link? Thanks for the help :)
Submitted byKzend (not verified)on Tue, 04/08/2014 - 12:04

Hi! Thanks for the help. How do you increase the knife speed but keep the hit detection? I can make the knife faster but then the knife doesn't hit.

Download new code and make this condition true as you increase the speed of kinfe.
  1. //kinfe hit
  2. if(kspeed==20)
  3. {
  4. kspeed=sx;
  5. health-=25;
  6. canvas.drawBitmap(note1, 0, 0, null);
  7. }
Submitted bySGil (not verified)on Fri, 04/18/2014 - 00:21

Brilliant game! Thank you!! I can see that you have all png images (coin, exit, knife, etc..) in the drawable folder, but I'm looking for the little man image.. I can't find it
Submitted byAndroid Developer (not verified)on Wed, 04/23/2014 - 13:06

Can u tell me from where i can learn to make games in android
Submitted bynurulnana (not verified)on Wed, 04/23/2014 - 13:10

i have an project, word search game..the engine already done but i dont have the main interface..can you help me? u can email me at [email protected]
Submitted bycalvis (not verified)on Tue, 04/29/2014 - 16:45

i want to develop a game where the user will be picking up stones from some holes to the main hole.for you to win the game you should be the first to gather all your stones to the main whole. so i don't know how to start it especial on designing the whole and the stones. please help me its a project. i am using eclipse
Submitted byKaushik Mandal (not verified)on Sat, 05/10/2014 - 02:16

This is Kaushik, although I am 44 years old but I desire to learn how to develop mobile application, especially Android ones. Being a linguist, I want to create a unique language learning based application which will involve sounds and possibly images too. Honestly, you can pronounce me a dumb person as long as coding goes, as I can't discover any logic. Although tried to learn basic java all by myself, could make out a little but still difficult. Having nowhere to learn programming for mobile platform, dying to learn it all by my sole endeavour. I could not find any similarities between java and android. Android seemed much harder to me. Am I right? Could you suggest me any internet links(one or more) which can easily help me understand both. Your kind help in my endeavour will be truly appreciated. Take Care!

Submitted bysogandon Mon, 05/12/2014 - 02:53

hi can you explain a methode for me.I wanna present this game for my confrence tomorrow. no deffrence witch method..

Nice sample.. I just published my apps on google play.. Feel free to try and review it here: https://play.google.com/store/apps/details?id=com.sheerapps.PushBall
Submitted bySachin malik (not verified)on Wed, 05/14/2014 - 13:22

showing emulator connection error please help

Add new comment