I have a small issue with an Asteroids clone I'm making. I move the asteroids across the screen with the following code:
ast_x[i] = ast_x[i] - sin((pi / 180) * ast_direction[i]) * tmp_moveSpeed;
ast_y[i] = ast_y[i] + cos((pi / 180) * ast_direction[i]) * tmp_moveSpeed;
Where ast_x[i] and ast_y[i] are the coordinates of the asteroids and ast_direction[i] is the movement angle (90 = right, 0 = up, etc). Also, if you can't tell, the asteroids are in arrays
So, my problem is that when the asteroid reaches a screen boundry, the asteroid just rides along the boundry, and doesn't follow it's defined rotational path. I have no code that does this. Is it because Dark GDK has issues calculating stuff outside of the screen boundries? Or is it something else I should debug myself?
-Mike