Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!bionet!agate!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Dragging playing pieces on a playing field (ANIMATION)... Keywords: Here is a valuable solution..... Message-ID: <27062@ucbvax.BERKELEY.EDU> Date: 8 Dec 88 07:19:14 GMT References: <33198@bbn.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 13 I am the author of Shepard Tones, among many others. The reason this solution flickers is: 1.) you restore the background, erasing the old position of the piece 2.) you draw the pice in its new location. in between the two draws, there is a split second where the background is visible, because you haven't drawn the new piece yet. to get this to be smooth, you need to add the following: if the old and new positions alllow any part of the old and new objects to overlap, then do all of the above to an off-screen bitmap, then copy the result to the screen, This gets around the transient background problem. Note, this offscreen bitmap can be quite small: at most twice the size of the object you are moving.