Pygame how to fix 'trailing pixels'?
问题 In the image the red trail is a trail that pygame is creating when I have a bounding rectangle added around sprites. The sprite also does it and the simplest solution was to just clear the surface to black after each redraw. However attempting to do so on the entire main surface is not such a good idea. How can I fix this? 回答1: Normally you will do: def draw(): # fill screen with solid color. # draw, and flip/update screen. But, you can update just dirty portions of the screen. See pygame