hello asmcommunity!

I played with Ron Thomas' Sprite1 example and encountered unpleasant effect: when border of bitmap is of different colour than colour of window's background then moving bitmap leaves behind itself a trace or some sort of tail like a comet :) (screenshots in attachment as well as source, executable binary, bitmap)

Is there a way to make it move without such a trace? I'm sure there is! So, where should I direct myself?
Posted on 2006-02-14 17:24:09 by asqyrk
It depends on what you want to do (as always). If it's just displaying a moving 2D bitmap, then you should clear the background before blitting the bitmap onto it.
Posted on 2006-02-14 17:53:07 by ti_mo_n
You may also find this very simple code which I've written useful. It demonstrates a very simple technique for animated sprites over a background.

Posted on 2006-02-17 00:35:16 by StatMat
as ti_mo_n pointed out, the problem is solved by clearing the background (filling it with white again). Try moving the sprite 60 times faster (on the X axis), to get a better understanding of the problem.

Also, using InvalidateRect often can cause problems with some PCs that don't have good drivers. (your app could take up 100% cpu for nothing).

If you're looking for a no-frills 2D engine for games, try my "Ilix", from www.ultranos.com/asm  ;)
Posted on 2006-02-18 00:01:24 by Ultrano