Xref: utzoo rec.games.programmer:2163 comp.sys.amiga.tech:14312 Path: 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 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 > <\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/>