From: "Tony O'Bryan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Scrolling+sprites Date: Wed, 19 Nov 1997 13:16:26 -0600 Organization: Southwest Missouri State University Lines: 20 Message-ID: <34733B0A.7F41@nic.smsu.edu> References: <3472EE16 DOT 41C6 AT cc DOT hut DOT fi> Reply-To: aho450s AT nic DOT smsu DOT edu NNTP-Posting-Host: clark.a42.smsu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Ville Lundberg wrote: > around it. But when I do this, by mixing double buffering and Allegros > scroll_screen, the sprites flicker; they create "ghost" images, when > running across the scrolling screen. It'looks terrible. My game uses I imagine that what you're doing isn't quite what you think you're doing. Without seeing the actual code, here are some possibilities: 1) When you copy your background to your working buffer, you're using a copy mode that masks color 0. This means that pixels from the previous screen that are under any occurance of color zero aren't erased. This will result in "bleed-through" images (partial images from the previous frame). 2) You're updating the wrong frame buffer. You may intend to update the invisible working screen, but you're actually updating the currently visible screen. This will result in flicker and massive "ghosting" since the visible screen gets updated on the wrong frame. 3) You're not accurately tracking your invisible and visible screens. This causes very unpredictable results depending on how mangled your buffer-tracking routine is.