Pure Screen 0 for @Pete and @AsciiHole 

Code: (Select All)
_Title "Exploding Ascii Diamonds" 'b+ 2025-11-15
' from PM conversations with AsciiHole
Randomize Timer
_FullScreen
Type Diamond
As Integer xc, yc, c, life, active
End Type
Const NDiamonds = 5
Dim Shared D(1 To NDiamonds) As Diamond
For i = 1 To NDiamonds ' initialize at random activation and life
D(i).xc = Int(Rnd * _Width - 1) + 1
D(i).yc = Int(Rnd * _Height - 1) + 1
D(i).c = Int(Rnd * 9) + 7
D(i).life = Int(Rnd * 15)
D(i).active = Int(Rnd * 2)
Next
While _KeyDown(27) = 0
Cls
ExplodeDiamonds
_Limit 10
Wend
Sub NewDiamond (i)
D(i).xc = Int(Rnd * _Width - 1) + 1
D(i).yc = Int(Rnd * _Height - 1) + 1
D(i).c = Int(Rnd * 9) + 7
D(i).life = 0
D(i).active = 1
End Sub
Sub ExplodeDiamonds
For i = 1 To NDiamonds
If D(i).active Then
drawDiamond D(i).xc, D(i).yc, D(i).life, ".", D(i).c
drawDiamond D(i).xc, D(i).yc, D(i).life + 1, ".", D(i).c
drawDiamond D(i).xc, D(i).yc, D(i).life + 2, "+", D(i).c
drawDiamond D(i).xc, D(i).yc, D(i).life + 3, "*", D(i).c
D(i).life = D(i).life + 1
If D(i).life > 15 Then D(i).active = 0: D(i).life = 0
Else
If Rnd > .75 Then NewDiamond i
End If
Next
End Sub
Sub drawDiamond (xc, yc, r, s$, c)
Color c
y1 = yc
y2 = yc
x = xc
i = r
While i >= 0
If y1 > 0 And y1 <= _Height - 1 Then
If x - 2 * i > 0 And x - 2 * i <= _Width - 1 Then Locate y1, x - 2 * i: Print s$;
If x + 2 * i > 0 And x + 2 * i <= _Width - 1 Then Locate y1, x + 2 * i: Print s$;
End If
If y2 > 0 And y2 <= _Height - 1 Then
If x - 2 * i > 0 And x - 2 * i <= _Width - 1 Then Locate y2, x - 2 * i: Print s$;
If x + 2 * i > 0 And x + 2 * i <= _Width - 1 Then Locate y2, x + 2 * i: Print s$;
End If
i = i - 1
y1 = y1 - 1
y2 = y2 + 1
Wend
End Sub
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

