Graphics 800,600,16,0
SetBuffer BackBuffer()
Type pl
Field x,y,angle,r
Field red,green,blue
End Type
For t = 1 To 20
For u= 0 To 1
p.pl=New pl
p\r=15*t
p\red=0
p\green=10*t+60
p\blue=0
p\angle=180*u
Next
Next
While Not KeyHit(1)
Cls
For p.pl=Each pl
p\x=Sin(p\angle)*p\r+400
p\y=Cos(p\angle)*p\r+300
Color 255,255,0
Oval 380,280,40,40
Color p\red,p\green,p\blue
Oval p\x-5,p\y-5,10,10
p\angle=p\angle + 20 - p\r/15
If p\angle > 360 Then
p\angle = p\angle - 360
EndIf
Next
fps=fps+1
If MilliSecs() > fps_time + 1000 Then
act_fps=fps
fps=0
fps_time=MilliSecs()
EndIf
Color 255,255,255
Text 10,10,"FPS:"+act_fps
Flip
Wend
End
|