🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1564

Page flipping (was What motion blur does for you)

#1564
From: Steven Eker
Date: Thu, 24 Dec 1992 10:35
28 lines
1822 bytes
In article <1992Dec22.202057.18233@blkbox>, collins@blkbox (Chad R. Collins) writes:
[stuff deleted]
|> 
|> 	Is there no other way to accomplish this? What you described in your
|> previous post really isnt practical for me- there will be too many objects
|> moving over an irregular background. My other choices have left me in a bit
|> of a quandry- if I use page flipping, waiting for the vertical retrace slows
|> things down too much, but if I dont, the animation is of course poor.
|> 

If your frame redraw code takes longer than one video frame, one way of speeding
things up is to use triple buffering rather than double buffering.

With double buffering once your redraw is complete you have to waste cpu time
waiting for the next vertical retrace so that you can flip pages.

With triple buffering once your redraw is complete, you start drawing the next
frame in the third buffer.
You have an interupt routine tied to the vertical retrace which checks
if the next frame is ready and does the page flip if so. Thus the extra buffer
allows you to have complete synchronisation of page flipping without
syncing (& therefore slowing) your redraw code.

This is easy to do on ataris/amigas but I don't know about PCs. Incidently
triple buffering also works well for sound generation if you're synthesizing/
pitch shifting your waveforms on the fly.

Steven
Technical Details
Message-ID: <709@muller.loria.fr>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!julienas!loria!loria.fr!eker
References: <1992Dec21.171731.26731@midway.uchicago.edu> <1992Dec22.202057.18233@blkbox>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!julienas!loria!loria.fr!eker
From: eker@loria.fr (Steven Eker)
Newsgroups: rec.games.programmer
Subject: Page flipping (was What motion blur does for you)
Message-ID: <709@muller.loria.fr>
Date: 24 Dec 92 10:35:09 GMT
References: <1992Dec21.171731.26731@midway.uchicago.edu> <1992Dec22.202057.18233@blkbox>
Sender: news@news.loria.fr
Organization: CRIN (CNRS) Nancy - INRIA Lorraine
Lines: 28