For i=1 To imax
stonex(i)=Int(Rnd(0,1280)/32)
stoney(i)=Int(Rnd(0,1024)/32)
Next
i=1
While finish=0
stonex(i+1)=stonex(i)+1
stoney(i+1)=stoney(i)
i=i+1
If i Mod 4=0 Then
stoney(i)=stoney(i)+1
stonex(i)=stonex(i-Rnd(4))
EndIf
If i Mod 16=0 Then
stonex(i)=Int(Rnd(0,1280)/32)
stoney(i)=Int(Rnd(0,1024)/32)
EndIf
If i=80 Then finish=1
Wend
For i=1 To imax
If stonex(i)<2 Then stonex(i)=stonex(i)+1
If stonex(i)>40 Then stonex(i)=stonex(i)-1
If stoney(i)<0 Then stoney(i)=stoney(i)+1
If stoney(i)>30 Then stoney(i)=0
m.Main=New Main
m\stone=LoadImage("stone.bmp")
m\x=stonex(i)*32
m\y=stoney(i)*32
m\life=10
Next
Это генерация камней группами. Если кому-нибудь пригодиться, можете пользоваться