Wotcha, folks.
Can anyone tell me why the following code:
Produces an 'ordered' sun-ray effect when the mouse button is held down?
Shouldn't my SEEDRND MILLISECS and PART\ANGLE=RND(360) produce a more .......random effect?
Much ta for any help.
Tobo.
Can anyone tell me why the following code:
Graphics 800,600,32,2 SetBuffer BackBuffer() SeedRnd MilliSecs Type particle Field x,y Field angle Field red,green,blue End Type ; MAIN LOOP While Not KeyHit(1) Cls If MouseDown(1) Then boom updateboom Flip Wend End Function boom() For f=1 To 10 part.particle = New particle part\x=MouseX() part\y=MouseY() part\angle=Rnd(360) part\red=Rnd(255) part\green=Rnd(255) part\blue=Rnd(255) Next End Function Function updateboom() For part.particle = Each particle part\x=part\x + Cos(part\angle)*4 part\y=part\y + Sin(part\angle)*4 Color (part\red),(part\green),(part\blue) Rect part\x,part\y,4,4 If part\x > 800 Or part\x<0 Or part\y>600 Or part\y<0 Then Delete part Next End Function
Produces an 'ordered' sun-ray effect when the mouse button is held down?
Shouldn't my SEEDRND MILLISECS and PART\ANGLE=RND(360) produce a more .......random effect?
Much ta for any help.
Tobo.