Here you go:
Angle is of course the angle of the direction of your ant. Speed is how fast your ant is going. Xrate and Yrate are the rate that x and y are changed by. They are calculated as above and added to their respective variables.
This is how a circle is calculated. If you did a For angle = 0 to 360 sort of thing, it would calculate a circle that has a radius of 5, because a circle is calculated X = Radius * Sin( Degree ), and Y = Radius * Cos( Degree ). So in reality you are calculating a circle for one specific degree.
Hope it helps.
<EDIT> I think there is a sample of Asteroids that comes with BMX if not you could try B+. Look at those examples and you can see how they do it.
Local angle, speed Local xrate, yrate Local x, y angle = 150 speed = 5 xrate = speed * Sin( angle ) yrate = speed * Cos( angle ) x = x + xrate y = y + yrate
Angle is of course the angle of the direction of your ant. Speed is how fast your ant is going. Xrate and Yrate are the rate that x and y are changed by. They are calculated as above and added to their respective variables.
This is how a circle is calculated. If you did a For angle = 0 to 360 sort of thing, it would calculate a circle that has a radius of 5, because a circle is calculated X = Radius * Sin( Degree ), and Y = Radius * Cos( Degree ). So in reality you are calculating a circle for one specific degree.
Hope it helps.
<EDIT> I think there is a sample of Asteroids that comes with BMX if not you could try B+. Look at those examples and you can see how they do it.