Tag Info

New answers tagged


Yes, thats called dirty blitting. The Newbie Guide to pygame touches on this. The steps they recommend to implement it are: Blit a piece of the background over the sprite’s current location, erasing it. Append the sprite’s current location rectangle to a list called dirty_rects. Move the sprite. Draw the sprite at it’s new location. Append the sprite’s ...


I don't think you need sin/cos. This is simple vector math. A vector is calculated by subtracting a point from another, as in target minus the source. In your case, the vector from (2,2) to (8,9) would be (8-2,9-2) = (6,7). Now you can always recover the target by adding the vector to the source (6,7)+(2,2)=(8,9). If what you want is to have 3 steps, just ...

Top 50 recent answers are included