As some of you may know, I'm almost complete with my Asteroids Deluxe hack. I am stuck on pretty much the last aspect of this game, and that is the movement of the wedges.
In the arcade game, once a 'Killer Satellite' is hit, it breaks up into three smaller ships ('wedges') that persue the player. I'm trying to recreate that here. The issue is, these three ships don't 'snap' to face the player, they kind of slowly turn as they are moving (like a car would) to go after the player.
If I have these known values at the point in time that I have to calculate this, does anyone know how I would go about doing it:
Wedge:
XPOSITION
YPOSITION
XVELOCITY (IN PIXELS)
YVELOCITY (IN PIXELS)
Player:
XPOSITION
YPOSITION
We also have the X and Y Velocity for the player, but I don't think that is needed here as the wedges track the ship's position, not direction.
The wedges also have a speed cap. They cannot go any faster than a velocity of 8 in any direction (for example). I am assuming we have to take into consideration the frame count (which there is a variable for) to make sure the wedge doesn't turn too fast or too slow...
Also, the bottom left corner if the screen is the home position (0, 0)
Thank you so much for this in advance, as I have been racking my brain on this for a few weeks now.
Bob
Edited by PacManPlus, Sat Jun 30, 2007 10:54 AM.













