Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:41:01+00:00 2026-06-07T20:41:01+00:00

I am creating a game where the user must tap the screen faster to

  • 0

I am creating a game where the user must tap the screen faster to allow them to go faster in game, however I have encountered some problems. I have made the game so it calculates the amount of taps per minute from the users last tap and their current tap, however this method seems to be jerky and does not work too well. I also cannot work out another way to do it, so that the when they don’t tap at all, it slows down.

How would I go about creating this mechanism for the game where the faster the user taps, the faster the game goes, and if they don’t tap at all it slows to a stop.

Thanks

Here is a snippet of what I have so far, calculating the Taps Per Minute (TPM) of the user. (This is in the on touch method). I am currently passing the TPM into an update method which moves the background by TPM/100 each time it updates (it’s running at 30FPS)

 if (thisTouch == 0 || lastTouch == 0) {
            Log.d("info","First Touch");
            thisTouch = lastTouch = System.currentTimeMillis();
        } else {
            Log.d("d","touch");
            thisTouch = System.currentTimeMillis();

            long difference = thisTouch - lastTouch;

            TPM = (int)((1000*60)/difference);

            lastTouch = thisTouch;
        }

I would like to know how I can change this so that the game speeds up when they click faster, and then slows when they do not touch the screen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:41:03+00:00Added an answer on June 7, 2026 at 8:41 pm

    Maybe you could do something like this:

    • Create a PriorityQueue< Long>
    • Whenever the user taps the screen, add (currentTime + someTimeOut) to the queue
    • Whenever you are going to check the current speed (eg size of queue), first remove all elements > currentTime.

    Don’t forget to add appropriate thread safety measures if you do something like this of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating pages for a small web-based game which must have some background music
I'm creating a Tic tac toe game, in that after click made by user
I am creating a game which have similar concept like Tap Tap Ant .
I am creating a click and clear game. Once the user clicks some brick
I am creating a game, and trying to allow the user to share their
I am creating a game with winforms C#. The game contains some images that
Hello I'm creating a game and I have a few ways to make trainers
I have started creating a game, and I added a second project, it's the
so i made a DOS program however my game always crashes on my second
I have 3 screens(xmls): screen 1 is main menu, screen 2 is main game

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.