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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:43:30+00:00 2026-06-07T18:43:30+00:00

I was trying to make an into transition to my game by having two

  • 0

I was trying to make an into transition to my game by having two bitmaps slide apart, like a garage door opening from the middle and half sliding downwards and half upwards. Anyway, when I do it, it looks really choppy and the frame rate seems unstable/unreliable. Here’s how I’m doing it.

public class TFView extends View{
...
public void startlevel(Canvas c){
     long l =(SystemClock.currentThreadTimeMillis()-starttime)/3;//*(height/500);
    if(l<1000){
        c.drawBitmap(metalbottom,0,height/2+l,p);
         c.drawBitmap(metaltop,0,0-l,p);}
    }
 public void endlevel(Canvas c){
     long l =(SystemClock.currentThreadTimeMillis()-failtime)/3;
    if(l>=height/2){
        c.drawBitmap(metaltop, 0, 0, p);
        c.drawBitmap(metalbottom, 0,height/2 , p);
    }
    else{
        c.drawBitmap(metalbottom,0,-height/2+l,p);
     c.drawBitmap(metaltop,0,height-l,p);}
 }}

and i set the times for when I want to open/close the doors respectively. So what do you think I should change to make it a more smooth transition? Would converting it to surfaceview help?

  • 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-07T18:43:32+00:00Added an answer on June 7, 2026 at 6:43 pm

    I had the same problem. I know what you mean with “choppy”. The animation speed is NOT consistent even though you have a time based animation i.e. you are using

    SystemClock.currentThreadTimeMillis()
    

    The choppiness is caused by currentThreadTimeMillis(). It “returns milliseconds running in the current thread”. That is, when you use currentThreadTimeMillis() “time” only elapses when the current thread is RUNNING. But your renderer thread is NOT ALWAYS running – as you would expect in a multitasking environment. Thus every time the thread is not running your animation is also not “running” (time is not elapsing).

    Solution: Use

    SystemClock.elapsedRealtime()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make it possible to drag files from the Finder into my
I'm having problems trying to make a reactive form. When I insert data into
I'm a .NET developer trying to make the leap into objective-c iPhone programming. I
Trying to make manageable output for Android to convert $output into JSONObjects. When I
I'm trying to make this: 174,myfilename.jpg Into this on the php post process page:
I'm trying to make my console application into a winforms application. The console version
I am trying to make a script to login into my check card balance
I'm trying to make a script that will go into a directory and run
I am trying to make my own Jabber bot but i have run into
I'm trying to make a class where I put a key and value into

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.