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 6904011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:59:47+00:00 2026-05-27T07:59:47+00:00

I am using AndEngine to add sprites to a scene. The sprites are all

  • 0

I am using AndEngine to add sprites to a scene.

The sprites are all added at a Timed interval that I can control through a class i created for it.

For Example to set the time(as second)

Timer timer = new Timer();
timer.setInterval(Float second);

I created this method so that the timer could change as i needed it to during the user interaction with the game.

So as the sprites are added to the scene they move on the y axis at random places.

I have two intervals that they take to control the max duration and minimum duration they take to move across the screen.

For example…

Private int MaxDurarion = 4;// 4 is equivalent to 4 seconds for this
Private int MinDuration = 2 //Same for minimum duration

I have a IUpdateHandler that is designed to be updated every second.

So in this method i update the score and other things accordingly.

Now the problem is i check to see if the user has reached a certain score, if they have then i would like to decrease the max duration and the minimum duration.

For Example..

if(userScore == MAX){
MaxDuration = MaxDuration - (int).2;
TimerSecond = TimerSecond - .1f;
}

Now i have tried it this way, but i have found that the Maxduration returns back to the original integer after each update.

I hope ive explained this well enough what i am trying to do.

Is there a better way to do this?

Thanks guys.

  • 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-05-27T07:59:48+00:00Added an answer on May 27, 2026 at 7:59 am

    You are casting .2 to an int which I believe is resulting in 0, so you aren’t changing the MaxDuration at all.

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

Sidebar

Related Questions

I am using andengine and I have some sprites that change color when pressed.
I am using AndEngine to create a game. I have randomly added sprites in
I am using AndEngine to add sprites to the screen and come across using
i am using AndEngine. I have a scene that i would like to reuse
I am using AndEngine. I have a Method that adds targets to the screne.
I am using this method i created to randomly create different sprites to be
I am using AndEngine for my game. In that I want to give option
I am using this method in Andengine to scroll through a list of items,
I'm using the appengine webapp framework ( link ). Is it possible to add
while using the appengine sdk i can't view the Output of my System.out.println statements

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.