|
|
| Animation - Erasing a Sprite |
|
Deus Ex Machina
Member #9,145
October 2007
|
Hi, I was wondering if anybody could expain this: To keep it simple, say I want to move a 10 x 20 rectangle around on the screen. If I try to erase it with a 10 x 20 rectangle of the background color, I get a "trail" in the path of motion. I can deal with this okay by making the erasing rectangle a bit bigger, but it doesn't make sense to me logically. If I draw a rectangle of the background color of exactly the same size, in exactly the same place the moving rectangle was, shouldn't it obliterate it? Thanks, Jim |
|
Paul whoknows
Member #5,081
September 2004
|
If my understanding is correct, a double buffer system is what you need. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
|
Neil Black
Member #7,867
October 2006
|
Are you moving it before erasing? Make sure you're erasing the right spot.
|
|
Slartibartfast
Member #8,789
June 2007
|
Make sure you Erase->Move->Draw->Render. ---- |
|
Neil Black
Member #7,867
October 2006
|
Quote: Make sure you Erase->Move->Draw->Render. Yeah, that's what I was trying to say.
|
|
|