Nothing Found :(
JSE - Buffer Drawing
2nd August 2021  
I've given up.. Have a Buffer.

-=-=-

I tried my best to come up with a nice way to align the buffer and all of that, but in the end..
Meh, it's just a buffer..
Use it as you will..

You can SetBuffer BG, draw whatever you want onto the buffer, the SetBuffer FG and DrawBG that repeatedly onto the screen.
You could, for example, draw a lovely background of trees or clouds or a brick wall, or other such things, then scroll it endlessly forever, or whatever.
Calling a DrawBG only draws one image, instead of all the things you drew onto it, so it's infinitely quicker when .. drawing a background!!

The BG buffer is always 1024x1024 pixels in size, so if you're using a large graphics mode, you'll probably want to set the drawing scale a bit larger before drawing it to the screen.

If you want to try to interact with the buffer, you'll have to use your imagination and infinite maths and coding skills, to try and bring it to life.

It is what it is, and .. at the very least, it does indeed work.

// Buffer Test // by Jayenkai // Created 2021/7/30 Symbol 0,"21_0_0.2!0_0_0?2,5!2,0_0_225_5,220_0?225_5/220_0025,3.5_5.20_2553?5_5!20/2553,25_5_20!2553,5_5_520?2553,5_5_5,20.253325_5_5.20,2553,5_5_5?200253,5_5_5!200253,5_5_5!2025,335_5_5/225,35_5_5@225_5_5_5,225_5_5_556225_5_5_556225_5_5_5662025_5_5_620025_5_5@6620025_5_5@6620,25_5_5!6620.25_5_5?6,20?25_5_5.6620!25_5_5,6,20/25_5_6.20_25_5/6.20_00225_556?220_0?225/6?220_0_2,56?2,0_0_0?2!"; Graphics 1920,1080,2 SetBuffer BG // Draw some bubbles to the BG buffer CLS SetSize 2 for n=0 to 100 DrawImg Rand(32,1024-32),Rand(32,1024-32),0,Rand(0,7) next SetBuffer FG // Don't forget to change back to the FG! scry=0 Repeat ResetDraw CLS 255,255,255 scry=scry-1 SetAlpha 0.6 for m=0.2 to 3 step 0.25 SetSize (m*0.5)+0.5 // Draw the contents of the BG buffer to the FG buffer, wrapping it multiple times. WrapBG MouseX()*m+(m*3717)+Sin(Mills()*m*0.02)*48,((MouseY()+scry)*m)+(m*768) next ResetDraw SetFontSize 128 SetCol 0,0,0,0.25 Text ScreenWidth()/2+6,ScreenHeight()/2+6,"HURRAY!",1 SetCol 180,200,255,1 Text ScreenWidth()/2,ScreenHeight()/2,"HURRAY!",1 Flip Forever

Views 9, Upvotes 0
Jse , Bg
Site credits : If you can see it, Jayenkai did it.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Buffer Drawing - AGameAWeek