Mail Archives: djgpp/1997/08/05/16:28:01
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 -