Posted: 09:37am 03 Aug 2020 |
Copy link to clipboard |
Print this post |
|
Hi,
I'm trying to work out if the FRAMEBUFFER commands will help me in my attempt to write a scrolling, tile-based game in MODE 3,16 (320x200 16-bit).
Is the framebuffer really just like a PAGE, and differs only in that it can be bigger than the selected MODE resolution? PAGE 0 is still what is visible on screen?
So I could do something like:
MODE 3,16 FRAMEBUFFER CREATE 640,480 FRAMEBUFFER WRITE DO ' drawing to a 640x400 framebuffer goes here ' now we copy a 320x200 'window' to page 0 FRAMEBUFFER WINDOW x,y,0,B LOOP
and I could have a 640x400 map, with a scrolling 320x200 region visible on screen?
Is using a FRAMEBUFFER to do this faster than just PAGE SCROLLing an offscreen page, BLIT new tiles into the gaps, then doing a PAGE COPY to 0 to finally display?
Robin https://github.com/robinhedwards |