It could involve keeping track of what has moved and what hasn't.
Only Redraw where needed.
Type: Posts; User: Norm
It could involve keeping track of what has moved and what hasn't.
Only Redraw where needed.
If you call the draw method 1000+ times it will be slower than if you call it 10 times.
If some of the images the draw method is drawing are in the same location that they were drawn the last time...
I suppose it depends on how many times a draw method is called.
Is there a way to call the draw method fewer times?
Can some of the drawing be reused? Draw the non moving part to a BufferedImage...
I didn't see any time lags in the list of times you posted.
Where do you see the lags?
To make the time lags easier to see, save the last time and next time you are there subtract it from the...
if (keyStatus == "DOWN"){
One problem here: Use the equals() method when comparing Strings, not ==
Please explain. Also add debugging printlns to your code that print out the current time from...