delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/19/11:33:20

From: Joshua Heyer <jheyer AT geocities DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Scrolling+sprites
Date: Wed, 19 Nov 1997 09:38:30 -0600
Organization: [poster's organization not specified]
Lines: 36
Message-ID: <347307F6.44D00BEE@geocities.com>
References: <3472EE16 DOT 41C6 AT cc DOT hut DOT fi>
NNTP-Posting-Host: cronkite.means.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ville Lundberg wrote:
> 
> Hi!
> When I found DJGPP and Allegro, I thought that NOW is the time to move
> on to C from QBasic, so I'm quite new at this. But now I have a really
> basic problem I just can't find an answer to anywhere else, so now I try
> here:
> In my game, the playground have to scroll while ca 15 sprites moves
> 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
> ModeX and I use the following logic:
>  move sprites co-ordinates;
>  scroll_screen;
>  blit(background to buffer);
>  blit(sprites to buffer);
>  blit(buffer to screen);
> This is how someone told me how to do it, but it still doesn't work.
> I would be really glad if someone could help me, because the game is
> almost ready otherwise.
> 
>  Thanks,
>  Ville Lundberg
> 
>  =-----=
> Ville Lundberg @ Helsinki University of Technology, Department of
> Materials Science and Rock Engineering.
> vlundber AT cc DOT hut DOT fi www.hut.fi/~vlundber

  It seems to me that you are re-drawing the whole screen every frame
anyway, but are also using ModeX hardware scrolling.  This would be
causing the flicker, because for a short time the old image would appear
shifted & then the new image would appear.  Try doing it without the
hardware scrolling, else try vsync-ing.

	-- Joshua Heyer

- Raw text -


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