🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #941

Re: Animation Speed & Redraw

#941
From: Philip J Stephens
Date: Thu, 06 Sep 1990 03:18
32 lines
2187 bytes
Dallas J. Hodgson writes:
> 
> If you're working on a real-time game that commonly
> has high numbers of animated objects moving around at all times (using a
> double-buffered screen) is it faster to clear out the undisplayed screen
> completely and redraw all the objects vs. restoring the background behind
> each object and then redrawing?

  If you are talking about having a background behind the
animated objects, then you going to have to dump the
background onto the entire area of the screen after clearing
it.  Hence if the sum of the areas of the foreground objects
is less than the area of the screen, storing and restoring
the background behind each object is probably going to be
faster.  You will have a little bit of overhead calculating
the position of the areas to save, but this can be minimized
by clever programming. 
  One way to get faster animation is to devide the screen
into a grid of identical squares, and then quickly dump
shapes into those squares.  This gives blindingly fast
animation, but of course to animate across squares you need
lots of pre-shifted shape tables.  There are other
considerations as well, but I won't bother you with the
details (suffice to say it's the fastest technique I've come
across so far).

</\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\></\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\>
<  Philip J. Stephens                ><   "Many views yield the truth."        >
<  Hons. student, Computer Science   ><   "Therefore, be not alone."           >
<  La Trobe University, Melbourne    ><   - Prime Song of the viggies, from    >
<  AUSTRALIA                         ><   THE ENGIMA SCORE by Sheri S Tepper   >
<\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/>
Technical Details
Message-ID: <8707@latcs1.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!mel.dit.csiro.au!latcs1!stephens
References: <1401@metaphor.Metaphor.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!mel.dit.csiro.au!latcs1!stephens
From: stephens@latcs1.oz.au (Philip J Stephens)
Newsgroups: rec.games.programmer,comp.sys.amiga.tech
Subject: Re: Animation Speed & Redraw
Message-ID: <8707@latcs1.oz.au>
Date: 6 Sep 90 03:18:38 GMT
References: <1401@metaphor.Metaphor.COM>
Followup-To: rec.games.programmer
Organization: Comp Sci, La Trobe Uni, Australia
Lines: 32