delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/23/16:31:23

From: Barry Rodewald <bsr AT hn DOT pl DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Scrolling+sprites
Date: Sat, 22 Nov 1997 22:52:47 +1300
Lines: 18
Message-ID: <3476AB6E.C903F505@hn.pl.net>
References: <3472EE16 DOT 41C6 AT cc DOT hut DOT fi>
NNTP-Posting-Host: bsr.hn.planet.gen.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ville Lundberg wrote:

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

I assume you have a virtual screen setup (using set_gfx_mode()) for the play
area?

Try blitting the background first to a buffer (memory bitmap) then use
draw_sprite() to copy the sprites to the buffer.  Then blit the buffer to
the screen then call scroll_screen to position the viewable part of the
screen.

Hope that this clears it up a bit,
Barry Rodewald.

- Raw text -


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