• Advertisement
Sign in to follow this  

dangerous curves

This topic is 2256 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do games generally make enemies move in really curvy ways like in Blazing Lazers?

Share this post


Link to post
Share on other sites
Advertisement
If they are on a set pattern, trigonometric functions are useful. If their movement is not on a set course, such as if they are reacting to the player, then there are a few methods to achieve those smooth curves. The main way is to model their movement as vectors and change an object's movement using velocity and accelerating vectors.
eg: If an object's velocity is (3,0) and its acceleration is (-1,2) for 3 seconds, then it will smoothly change course from east to north while accelerating. In the case of a game like blazing lazers, this is like simulating thrust.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement