Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

SDL/C++ surfaces left behind after movement


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 ChainedHollow   Members   -  Reputation: 137

Like
0Likes
Like

Posted 14 September 2012 - 01:28 PM

Hi guys, sorry to bother you again, but I have another issue with my first SDL game(Tetris).
The problem Im having is that when I move the surface using the left/right keys or move the window, there is a copy of the surface left behind on the screen at the position where the movement occured.

The block constantly falls down, obviously, and that works just fine, its only when I press the key to move the block left or right or click the window to move it.

Thank you for any assistance.

Ad:

#2 fastcall22   Members   -  Reputation: 1871

Like
0Likes
Like

Posted 14 September 2012 - 01:36 PM

Separate your updating logic from your rendering logic and double check that each object is only rendered once. Also check that the rendering surface is cleared each frame before any rendering.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS