delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/05/16:28:01

Message-Id: <m0wvpw1-0003GcC@fwd02.btx.dtag.de>
Date: Tue, 5 Aug 97 22:10 MET DST
To: djgpp AT delorie DOT com
References: <33E4E107 DOT 92461C57 AT flex DOT net>
Subject: Re: Allegro --> virtual framerate
MIME-Version: 1.0
From: Georg DOT Kolling AT t-online DOT de (Georg Kolling)

Marcus D. Brenneman schrieb:
> How can I accomplish that trick
> that's seen in DOOM, Quake, etc.?
>

For smooth animation you should always use page flipping or double buffering.
If you do so, it's an easy way to get a constant speed on any computer:
Just draw the picture and look how much time it took, then make up a routine 
that calculates AI, object moving, etc., for exactly the time you needed to draw 
the picture. For example: on a 486, one frame takes 30 ms, while a certain 
object moves 1,5 m; on a Pentium, the same frame takes only 20 ms, so the object
only moves 1 meter per frame   



- Raw text -


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