07-29-2023, 10:13 PM
Here is my attempt to do glowing lasers. It's possible my video card makes the glowing affect, I have no idea why it does it besides constantly re-tracing the circles over and over. I left-in that weird random effect it makes before it erases the screen and starts over as well. As most of you know, I am still a novice.
Code: (Select All)
Screen _NewImage(800, 600, 32)
Dim x(10000), y(10000)
For t = 1 To 5000
x(t) = (Rnd * 800)
y(t) = (Rnd * 600)
Next t
Do
keepgoing:
_Limit 150
r = Int(Rnd * 100) + 150
g = Int(Rnd * 100) + 150
b = Int(Rnd * 100) + 150
For t = 1 To 500
If t > 1 And y(t) < y(t - 1) Then y(t) = y(t) + 1
If t > 1 And y(t) > y(t - 1) Then y(t) = y(t) - 1
If t > 1 And x(t) < x(t - 1) Then x(t) = x(t) + 1
If t > 1 And x(t) > x(t - 1) Then x(t) = x(t) - 1
If y(t) > 600 Then
y(t) = 0
x(t) = (Rnd * 800)
End If
For sz = .5 To 5 Step .2
Circle (x(t), y(t)), sz, _RGB32(r, g, b, 255)
Next sz
Next t
_Display
tt = tt + 1
If tt > 25 Then
ttt = ttt + 1
If ttt < 30 Then tt = 0: GoTo keepgoing:
ttt = 0
tt = 0: Cls
GoSub more:
End If
Loop
more:
For t = 1 To 5000
x(t) = (Rnd * 800)
y(t) = (Rnd * 600)
Next t
Return