Choppy rendering

[s]I had some problems with choppy rendering where the game would look like it was rendering a frame behind every other frame, mildly straining my eyes.
After some minutes of fooling around I might have solved the problem. What I did differently was using more precision in my game loop (using time in nanoseconds and not milliseconds, exchanging floats for doubles).

My question is, is this all a coincidence and I did not solve the problem and if so, what may be causing the problem?

I’m utilizing JFrame, triple-buffering & basically the loop everyone else is using.
Here is the entire Game class: http://pastebin.com/G9zSb73L

For clarification, the game window is not flickering with black & white images. I just found there are a lot of people having problems with that so I want to make it clear I do not have that problem. Keeping it safe here.[/s]


Upon launching my game, the canvas in my JFrame is unrendered for one frame. It’s basically a grey rectangle flashing before the game starts like every other game. Is there a way of avoiding that?

Here’s the code:
http://pastebin.com/yqqZZGbu

I think, however I don’t know, that you should be setting unprocessed back to 0 every frame as its the delta between two frames. Right now you’re subtracting 1 from it and I honestly don’t know why you are. Also, triple buffering may be a but much, double should be fine and it’ll be less resource intensive. Going from double to triple causes around a 50fps drop on my decent setup.
Edit: any way you could post a video about whats actually happening? I don’t really know what you mean by its rendering frames behind other frames.

It seems changing the buffering has solved it, independent of if I’m using nanoseconds or milliseconds!

To answer the delta thing let’s say it takes 32 milliseconds to get to the next frame/update (let’s imagine we have the world’s slowest PC). That means we need to update the game twice in order to not affect the speed of the game. That’s why I have a loop which keeps that in order.

And the edit question: I don’t know if that would be possible since YouTube only allows for 30 FPS and not 60 which the game is locked at. The best explanation I can give really is this:
You’re going to the right. However, every third or second frame or so it looks like the game throws an outdated frame of the game. So if we say we walk to right every now and then a frame would pop up showing the character some pixels behind.

Thanks for the reply!

Bumping because I added a question on top of my gathered answers.