Jump to content
  • Advertisement


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


DirectDraw flickering

This topic is 5950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!