From: "jakub" Newsgroups: comp.os.msdos.djgpp Subject: Re: Sprite "ghost" help please. Date: Tue, 21 Jul 1998 13:40:02 +1000 Organization: OzEmail Ltd. Lines: 54 Message-ID: <6p12m0$r7u$1@reader1.reader.news.ozemail.net> References: <002901bdb03d$955c7500$784e08c3 AT arthur> NNTP-Posting-Host: slsdn2p08.ozemail.com.au To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I've noticed that the allegro demo game has the same problem on my system. I select page flipping mode, with a 640x480 screen. When you move your shift left-right, I can see two ships slightly appart, like a ghost image on a bad tv set. It seems I am seeing the last position of the ship sprite. Is this normal? Arthur wrote in message <002901bdb03d$955c7500$784e08c3 AT arthur>... >>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. > > >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. Think I am doing it the right way, I posted a bit of my source in my original message. I just copied the page flipping idea from one of the allegro examples. >Also, are you checking for a vertical blank before you >swap the screens? I just added this to the source but it has not made any difference. > >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. Yes this is what I am doing. > >HTH > >James Arthur >jaa AT arfa DOT clara DOT net > > >