Orbit

BlitzPlus Forums/BlitzPlus Programming/Orbit

Graphics 800, 600, 0, 2
SetBuffer BackBuffer()

x = 400
y = 300

Repeat

	Cls
	
	Oval x - 10, y - 10, 20, 20
	
	ax = Cos(ang) * 80 + x
	ay = Sin(ang) * 80 + y
	
	Oval ax - 3, ay - 3, 6, 6
	
	;ang = 270 - ATan2(MouseX() - x, MouseY() - y)
	ang = ang + 5
	
	Flip
	
Until KeyHit(1)

End