Developing a game on android is a whole new ball game i.e. very different from making database apps. You have to know the logic behind every move. The flow of the program is complex and you also have to keep in mind about the memory issues if necessary.
Mind games are great mind-teasers as well as thrilling to the general smartphone users. Ever wondered what are the essentials that a typical mind game program is comprised of?
We usually have the following: Random Numbers, Timer, and MotionEvent.
Here is a source code for a little game on Android that i named "Reflexo", as it measures one's reflexes :)
main.xml
reflexo.java:
Mind games are great mind-teasers as well as thrilling to the general smartphone users. Ever wondered what are the essentials that a typical mind game program is comprised of?
We usually have the following: Random Numbers, Timer, and MotionEvent.
Here is a source code for a little game on Android that i named "Reflexo", as it measures one's reflexes :)
main.xml
reflexo.java:
package com.games.reflexo;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class Reflexo extends Activity {
/** Called when the activity is first created. */
int score = 0;
int left = 0;
int top = 0;
int right = 0;
int bottom = 0;
Button startGame;
ImageView imgView;
TextView scoreDisplay;
MyCount counter;
int length = 10000;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
startGame = (Button)findViewById(R.id.start);
imgView = (ImageView)findViewById(R.id.img);
scoreDisplay = (TextView)findViewById(R.id.score);
startGame.setOnClickListener(new View.OnClickListener(){
public void onClick(View v)
{
startGame.setVisibility(0);
counter.start();
}
});
imgView.setOnTouchListener(new OnTouchListener(){
public boolean onTouch(View v,MotionEvent e) {
if (e.getAction() == MotionEvent.ACTION_DOWN)
{
score++;
}
return true;
}});
counter = new MyCount(length, 300);
}
public class MyCount extends CountDownTimer
{
public MyCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
public void onFinish() {
scoreDisplay.setVisibility(1);
scoreDisplay.setText("Score:" + score);
}
public void onTick(long millisUntilFinished) {
Random randomNum = new Random();
left = randomNum.nextInt(200);
top = randomNum.nextInt(400);
right = randomNum.nextInt(200);
bottom = randomNum.nextInt(400);
if (millisUntilFinished / 100 % 2 == 0)
{
imgView.setPadding(left, top, right, bottom);
imgView.setVisibility(View.VISIBLE);
}
else
{
imgView.setVisibility(View.INVISIBLE);
}
}
}
}
I really like your blog. You make it interesting to read and entertaining at the same time. I cant wait to read more from you.
ReplyDeleteOracle training in pune
This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
ReplyDeleterpa Training in annanagar
blue prism Training in annanagar
automation anywhere Training in annanagar
iot Training in annanagar
rpa Training in marathahalli
blue prism Training in marathahalli
automation anywhere Training in marathahalli
blue prism training in jayanagar
automation anywhere training in jayanagar
Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
ReplyDeleterpa Training in Chennai
rpa Training in bangalore
rpa Training in pune
blueprism Training in Chennai
blueprism Training in bangalore
blueprism Training in pune
rpa online training
Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!
ReplyDeleteClick here:
angularjs training in marathahalli
Click here:
angularjs training in bangalore
This is such a great post, and was thinking much the same myself. Another great update.
ReplyDeleteClick here:
Microsoft azure training in velarchery
Click here:
Microsoft azure training in sollinganallur
I'm here representing the visitors and readers of your own website say many thanks for many remarkable
ReplyDeletepython training institute in chennai
python training in velachery
python training institute in chennai
This is good site and nice point of view.I learnt lots of useful information.
ReplyDeletepython training in OMR
python training in Bangalore
python training in rajajinagar
Excellent blog, I wish to share your post with my folks circle. It’s really helped me a lot, so keep sharing post like this
ReplyDeleteBlueprism training in marathahalli
AWS Training in chennai
AWS Training in bangalore
I love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. . .
ReplyDeletepython training in tambaram
python training in annanagar
python training in OMR
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
selenium training in chennai
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteData Science with Python training in chenni
Data Science training in chennai
Data science training in velachery
Data science training in tambaram
Data Science training in OMR
Data Science training in anna nagar
Data Science training in chennai
Data science training in Bangalore
Hello I am so delighted I found your blog, I really found you by mistake, while I was looking on Yahoo for something else, anyways I am here now and would just like to say thanks for a tremendous post. Please do keep up the great work.
ReplyDeletejava training in chennai | java training in bangalore
java online training | java training in pune
java training in chennai | java training in bangalore
A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end.
ReplyDeletepython training in Bangalore
python training in pune
python online training
python training in chennai
A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts read this.
ReplyDeletepython training in pune
python online training
python training in OMR
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
ReplyDeleteDevops Training in Chennai
Devops Training in Bangalore
Devops Training in pune
Really you have done great job,There are may person searching about that now they will find enough resources by your post
ReplyDeleteBlueprism training in Bangalore
Blueprism training in Pune
Blueprism training in Chennai
Appreciating the persistence you put into your blog and detailed information you provide
ReplyDeleteBlueprism training in tambaram
Blueprism training in annanagar
Blueprism training in velachery
I am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for. Many thanks!
ReplyDeleteData science training in tambaram | Data Science training in anna nagar
Data Science training in chennai | Data science training in Bangalore
Data Science training in marathahalli | Data Science training in btm
Wonderful article, very useful and well explanation. Your post is extremely incredible. I will refer this to my candidates...
ReplyDeleteData science course in tambaram | Data Science course in anna nagar
Data Science course in chennai | Data science course in Bangalore
Data Science course in marathahalli | Data Science course in btm
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteangularjs Training
in chennai
angularjs Training in chennai
angularjs-Training in tambaram
angularjs-Training in sholinganallur
angularjs-Training in velachery
This is very good content you share on this blog. it's very informative and provide me future related information.
ReplyDeletejava training in jayanagar | java training in electronic city
java training in chennai | java training in USA
Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
ReplyDeletejava training in tambaram | java training in velachery
java training in omr | oracle training in chennai
Wonderful bloggers like yourself who would positively reply encouraged me to be more open and engaging in commenting.So know it's helpful.
ReplyDeleteData Science training in rajaji nagar | Data Science with Python training in chenni
Data Science training in electronic city | Data Science training in USA
Data science training in pune | Data science training in kalyan nagar
I really appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thx again!
ReplyDeleteangularjs Training in marathahalli
angularjs interview questions and answers
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in chennai
https://christopheralunlewis.blogspot.com/2010/07/adding-alphabetical-lists-in-salesforce.html?showComment=1540194049057#c1720707150627834170
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI am really happy with your blog because your article is very unique and powerful for new reader.
ReplyDeleteClick here:
selenium training in chennai
selenium training in bangalore
selenium training in Pune
selenium training in pune
Selenium Online Training
https://mcqquestion.blogspot.com/2013/06/web-technologies-internet-technologies_4.html
Your blog stuffed with lot of latest technologies news. Thanks for refreshing my mind
ReplyDeleteHadoop Training Velachery
Hadoop Training in Velachery
Big Data Training in Velachery
Hadoop Training adyar
Hadoop Training in adyar
Big Data Training in adyar
Hadoop Training Tambaram
Hadoop Training in Tambaram
Big Data Training in Tambaram
This comment has been removed by the author.
ReplyDeleteThat was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
I have been meaning to write something like this on my website and you have given me an idea. Cheers.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Python online training
uipath online training
ReplyDeleteYour info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
If you are looking for any Big data Hadoop Related information please visit our website Big Data Hadoop Training In Bangalore page!
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. Automation Anywhere Training in Bangalore
ReplyDeletevery nice post..
ReplyDeleteinplant training in chennai
inplant training in chennai
inplant training in chennai for it
Australia hosting
mexico web hosting
moldova web hosting
albania web hosting
andorra hosting
australia web hosting
denmark web hosting
nice work keep it up thanks for sharing the content.Thanks for sharing this type of information, it is so useful.Its a very amazing blog !!! This valuable and very informative blog is going to help the people to a great extent. Thanks for sharing it here.
ReplyDeleteData Science Training In Chennai
Data Science Online Training In Chennai
Data Science Training In Bangalore
Data Science Training In Hyderabad
Data Science Training In Coimbatore
Data Science Training
Data Science Online Training
ReplyDeleteNice article and thanks for sharing with us. Its very informative
Machine Learning Training in Hyderabad
This post is so interactive and informative.keep update more information...
ReplyDeleteSpoken English Classes in Velachery
Spoken English Classes in Chennai
This post is so interactive and informative.keep update more information...
ReplyDeleteSalesforce Training in Tambaram
Salesforce Training in Chennai