New games every week!
JSE - Screen Effects Blog
6th July 2021
Added a few basic effects for the engine, today.

-=-=-

// Screen Effect Test // by Jayenkai // Created 2021/7/6 Graphics 512,512,2 a=0 txt="Click to Test" Repeat CLS 255,255,255:SetCol 64,64,64:Rect 0,0,ScreenWidth()/2,ScreenHeight() ResetDraw() SetFontSizeFit(txt,ScreenWidth()*0.75,ScreenHeight()) SetCol 255,0,0:Text ScreenWidth()/2,ScreenHeight()*0.25,txt,1 SetCol 0,255,0:Text ScreenWidth()/2,ScreenHeight()*0.5,txt,1 SetCol 0,0,255:Text ScreenWidth()/2,ScreenHeight()*0.75,txt,1 if MouseHit() a=(a+1) mod 11 if a==0 then txt="Click to Test" if a==1 then txt="Noise" if a==2 then txt="Scanlines" if a==3 then txt="Noise+Scanlines" if a==4 then txt="VLines" if a==5 then txt="Noise+VLines" if a==6 then txt="Noise+Scanlines+VLines" if a==7 then txt="Glitch" if a==8 then txt="Glitch+Noise" if a==9 then txt="Glitch+Noise+Scanlines+VLines" if a==10 then txt="Soft" ScreenEffect(txt,1) Endif Flip Forever


Some basic screen effects..
They're quite intensive, since they redraw the entire canvas, so are best used when you have tons of free CPUTime to spare.
The last "soft" effect seems to have the worst slowdown of them all, since it's redrawing the entire canvas over itself, 4 times!
Yikes!!

If you can think of any other effects I could do with a basic Javascript Canvas, be sure to let me know.
Views 67, Upvotes 6  
Jse
New games every week!
Site credits : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed

Blog - JSE - Screen Effects - AGameAWeek