| Other BBSes » |
Atari coding BBS
|Benefits of tripple buffering|
Posted by: Simon Sunnyboy / Paradize
today I was thinking if tripple buffering graphics may have an advantage.
I think Paranoid and earx already suggested using so....(yeah i'm reinventing the wheel) but I would like to explore the backgrounds of the technique a bit.
The idea is to have 3 logical screens
1 screen of those is shown (physical screen)
1 of the 3 screens is selected as the logical screen to draw onto
<- NOTE: NOT synced with VBL here
draw background to logic screen
draw sprites and objects to logic screen
set physical screen to set by next VBL interrupt to the current logic screen
update logic screen pointer for next drawing cycle to the next out of 3
continue at MAINLOOP
The VBL ISR interupts the loop at any time and sets the screen address to the one given
in the step "physical screen". The old address is kept unless changed from within the loop.
In theory, if drawing takes 1,5VBLs, at one time I will happen to draw faster so that one of my frames will get shown 1 VBL long only because the next one is already ready and its address set.
I wonder if this gives any advantages or disadvantages?
Just thinkering, no special application or game planned ;)
[All messages in this thread]