Search:

Type: Posts; User: Norm

Search: Search took 0.14 seconds.

  1. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Not a crime. But it is courteous to post links to other sites where the the topic is posted so everyone can see what progress is being made.
  2. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Also posted at slow java on my computer
  3. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Sorry, I have no ideas how to change your times for the program. The timePassed values for the latest program:
    // [10, 0, 0, 0, 0, 233, 384, 77, 85, 190, 89, 15, 8, 6, 7, 2, 6, 1, 1, 0, 2, 3,...
  4. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    I have no idea why the timing is different on your PC.
  5. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    The code works when I use what I posted in post#20. It keeps x inbounds.
  6. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    This will fix the problem:

    public void movieLoop(){
    long cumTime = System.currentTimeMillis()+1; //<<<<<<<< THIS keeps x in bounds
  7. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Code should not depend on a fixed screen size to work. It should use the existing screen size to set the drawing bounds.
  8. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    The new code draws at these coordinates which are off my screen:
    draw ball @ x=2068.0 y=21.38312
  9. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    The ball's motion has changed to a straight down on the left side to off the screen movement. It used to start in upper left, move to the right and down and bounce around some before moving to the...
  10. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Can you post the current code?

    Have you removed all the extra object creating?
  11. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Interesting that your timePassed values are 10 times mine. See post#8
  12. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Can you post some of the output for when the code computed the frame rate to show its values?

    The values I get for timePassed when counted and saved in an array:

    //[5, 0, 0, 0, 3, 169, 154,...
  13. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    Look at all the places where "= new" is coded. If you see more than one for any class, think about removing all but one of them and using that one in all the places where new ones are created.
    ...
  14. Thread: lagging animation

    by Norm
    Replies
    35
    Views
    3,389

    Re: lagging animation

    One comment so far: The formatting of the code is poor. The {}s aren't in the right columns.

    Next comment: There are too many new instances of classes created instead of passing a reference to...
Results 1 to 14 of 14