05-02-2022, 12:00 AM
Don't Attempt to Adjust Your Screen
Code: (Select All)
_Title "Scrolling Plasma Lines Mod 1" 'B+ 2019-10-09
Randomize Timer
xmax = _DesktopWidth - 1
ymax = _DesktopHeight - 1
Screen _NewImage(xmax, ymax, 32)
_FullScreen
Dim ln(0 To ymax) As _Unsigned Long
r = Rnd ^ 2: g = Rnd ^ 2: b = Rnd ^ 2
f = xmax / ymax
While _KeyDown(27) = 0
If Rnd < .05 Then r = Rnd ^ 2: g = Rnd ^ 2: b = Rnd ^ 2
For i = UBound(ln) - 1 To 0 Step -1
ln(i + 1) = ln(i)
Line (0, i)-Step(xmax, 0), ln(i + 1)
Line (xmax - i * f, 0)-Step(0, ymax), ln(i + 1)
Line (i * f, 0)-Step(f, ymax), ln(i + 1)
Line (0, ymax - i)-Step(xmax, 0), ln(i + 1)
Next
ln(0) = _RGB32(127 + 127 * Sin(r * c), 127 + 127 * Sin(g * c), 127 + 127 * Sin(b * c), 40)
c = c + 1
_Display
_Limit 60
Wend
b = b + ...