Object shown twice during animation
Posted 01 November 2005 - 06:08 PM
I'm creating a second game with my 2D engine, and its modelled after Breakout. I started on this one so that I could get my hands dirty with a bit more advanced collision detection than a game like Missile Command would have. However, I've run into a graphical problem. My engine eliminates flickering with a back buffer. But now I've run into another interesting and almost-as-annoying problem.
Any object that has any kind of velocity leaves behind an after image respective to its velocity. So let's say the ball that destroys the bricks and all of that will leave behind a second ball. Even the paddle, which moves pretty slow seems to double up.
Is there any way to eliminate this problem? I can't imagine what would even cause this problem to occur. I slowed down the frame rate and the objects are 'jiggling' back and forth so I'm guessing it has something to do with the way the human eye interprets the monitor output. But how do I fix a problem like that?
Posted 01 November 2005 - 06:22 PM
Also make sure you are clearing your back buffer properly before drawing into it. And check that your buffer flipping is correct so that you are not accidentally drawing twice into the same buffer.
What do you mean by that? Do they move back and forward instead of just moving forward?
You could check a proper movement by lowering your frame rate to 2 or 3 frames per sec.
Posted 01 November 2005 - 06:36 PM
The background is black....but I like it that way. Hopefully that won't be a problem.
All of the buffer code should be correct. I won't go into details why I know that since it would be pretty long winded and pointless. However, it seems to me that the problem might be how long its taking the window to update. Say, when one frame is rendered, the next frame is rendered at such a speed that to the eye it looks like the last frame hasn't disappeared yet.
Don't know if this will help any, but this is a 'faked' picture of what it looks like. I used PrintScreen to take a picture of the game, but obviously it won't show the problem so I just copied and pasted the ball to show what it looks like when you play the game.
Posted 01 November 2005 - 07:14 PM
Also, could you please try to make your topic titles a bit more descriptive? It's tough deciding whether or not a thread titled "sorry" is something I can contribute to without reading it all :)
Posted 01 November 2005 - 07:57 PM
Posted 02 November 2005 - 10:01 AM
Posted 02 November 2005 - 10:17 PM
But I'm sure it has something to do with the speed at which my engine is capable of rendering or something stupid like that. Either way, its very bothersome but I think I may know a solution. We'll see.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users