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.
Type: Posts; User: Norm
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.
Also posted at slow java on my computer
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,...
I have no idea why the timing is different on your PC.
The code works when I use what I posted in post#20. It keeps x inbounds.
This will fix the problem:
public void movieLoop(){
long cumTime = System.currentTimeMillis()+1; //<<<<<<<< THIS keeps x in bounds
Code should not depend on a fixed screen size to work. It should use the existing screen size to set the drawing bounds.
The new code draws at these coordinates which are off my screen:
draw ball @ x=2068.0 y=21.38312
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...
Can you post the current code?
Have you removed all the extra object creating?
Interesting that your timePassed values are 10 times mine. See post#8
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,...
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.
...
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...