Author |
Message |
Notthebbq
![](http://compsci.ca/v3/uploads/user_avatars/11181326514ee8f2aca9c82.jpg)
|
Posted: Thu Apr 07, 2011 12:30 pm Post subject: Leaving the trail behind |
|
|
My group and I have run into a small problem with our TD game in potentia. Whatever image we use to stand in for the cursor leaves a trail of coloured pixels bahind it, ruining the otherwise untouched background. Does anyone have any tips on how to modify either the cursor image or the program itself so a trail of pixels is not left behind?
Wer're using Pygame with our coding, and this does not effect area with a background image loaded, just the area coloured as per the code commands. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: Thu Apr 07, 2011 12:43 pm Post subject: RE:Leaving the trail behind |
|
|
Is it jumbled up colours with no distinct image, or just the cursor image never clearing? |
|
|
|
|
![](images/spacer.gif) |
Notthebbq
![](http://compsci.ca/v3/uploads/user_avatars/11181326514ee8f2aca9c82.jpg)
|
Posted: Thu Apr 07, 2011 12:53 pm Post subject: Re: Leaving the trail behind |
|
|
cursor image not clearing |
|
|
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: Thu Apr 07, 2011 1:03 pm Post subject: RE:Leaving the trail behind |
|
|
Try clearing the previous image before the next update. |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Thu Apr 07, 2011 2:56 pm Post subject: RE:Leaving the trail behind |
|
|
Does Python not have access to the OS API? You may be able to change the image through the OS (though this would require you to write separate functions for each OS). |
|
|
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: Thu Apr 07, 2011 2:59 pm Post subject: RE:Leaving the trail behind |
|
|
That also would not be necessary with Pygame. |
|
|
|
|
![](images/spacer.gif) |
|