Message-ID: <002901bdb03d$955c7500$784e08c3@arthur> Reply-To: "Arthur" From: "Arthur" To: "DJGPP Mailing List" Subject: Re: Sprite "ghost" help please. Date: Wed, 15 Jul 1998 23:11:49 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk >I'm slowly learning to write my first game. >I have a sprite that moves horizontally across the screen controlled by the >keyboard. > >Am using Allegro, with a 640x480 screen, and page flipping. >The problem is that when the ship moves, I can see it 'flickering' at the >edges. >Is there any way to fix this? You are using two "screens" do draw sprites. It may seem a stupid question, but are you drawing and erasing the same sprites from the same screen each loop. It happens. Also, are you checking for a vertical blank before you swap the screens? The correct order (although this can vary depending on what graphics mode you're in or what graphics card you have) is: 1) erase old sprites on hidden screen. 2) draw new sprites on hidden screen. 3) wail for vertical retrace. 4) swap screens. HTH James Arthur jaa AT arfa DOT clara DOT net