www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/21/07:25:31

Message-ID: <003801bdb49a$13b600a0$194e08c3@arthur>
Reply-To: "Arthur" <arfa AT clara DOT net>
From: "Arthur" <arfa AT clara DOT net>
To: "DJGPP Mailing List" <djgpp AT delorie DOT com>
Subject: Re: Sprite "ghost" help please.
Date: Tue, 21 Jul 1998 12:02:28 +0100
MIME-Version: 1.0

>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?


Doen't happen to me. Which graphics card driver are you using? If you have
an older graphics card, then you may not have the correct VESA drivers
installed. I have no problems using VESA 1.x, both VESA 2.0 modes and the
ATI Mach 64 driver (for my ATI Rage Pro Turbo card). I've gone over the
source - there's no problems there. Try installing Display Doctor or UniVBE
and see if the same happens.

The TV ghost image you are on about does still happen, although much reduced
on a monitor. This is because the phosphor coating on the screen is still
glowing from the last time the electron gun hits it when the new screen is
redrawn. It's most noticable on the starfield. The way to get around that is
to use a fake motion blur between the points moved. You can see this in
action in space games, such as I-War, where when you turn, the stars blur
until you stop moving.

James Arthur
jaa AT arfa DOT clara DOT net


>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
>>
>>
>>
>
>
>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019