This topic is now archived and is closed to further replies.


DirectDraw flickering

Recommended Posts

JJXtra    122
Hello, I hope someone can help me with this, I am using directx SDK8, and have a problem I think with the Flip(...) method. I have a spaceship and it moves with keyboard input from direct input. When I have no timer delay and nothing going on, it moves smoothly and no problems. When I lock the frames per second with a timer, you can see the current and after image of the ship (it appears very fast, but looks bad). My main loop: { DWORD currentTick = GetTickCount( ); drawBackground( ); //draws the background (planets, start, etc). processInput( ); //directinput reading the keyboard keys processShip( ); //process and display the spaceship display->Flip( ); //flip the directdraw7 surface while(GetTickCount( ) - currentTick < 66); //wait for a bit } When I take away the GetTickCount functions, and add in the rest of my object processing, it works ok to a point. When I put like 500 torpedos on the screen though, the space ship does the same flickering. Shouldn''t it just move slower frame by frame? Any help is appreciated, and congratulations if you got through this whole post with your sanity intact. Thanks, Jeff Johnson

Share this post

Link to post
Share on other sites