algorithm for creating missile paths for a 2D game

Started by
2 comments, last by LorenzoGatti 4 years, 5 months ago

Does anyone have any thoughts on how to create paths for missiles that make random curly-q type patterns before homing in on a target? 

Advertisement
2 hours ago, Davicus said:

...random curly-q type patterns before homing in on a target...

Do you mean random movement with curly-q's, and then start following the target? Or random curly-q movement while following the target?

I don't know how convenient this would be for you, but it could be helpful to see an image (drawing or whatever) showing what you have in mind exactly.

Adding to Zakwayda's comment, designing "algorithms" for pretty curly flight paths is a mostly quantitative matter.

Assuming a physically sound dynamic model in which the missile accelerates and turns according to the wishes of the missile AI (as opposed to arbitrarily interpolating position along a path) you need to find a balance of obvious parameters and mechanisms that makes the missile chase the target, but not too well:

  • maximum velocity (as an objective: the missile needs to be faster than the target to hit, excessive speed leads to overshooting dodging targets, which is probably something you want in moderation, and to increased turning radius, which might become too large for the scale of the available space)
  • maximum acceleration and deceleration, which might be different
  • maximum torque, which influences turning radius
  • delay between launching the missile and beginning to steer it
  • choosing new values of acceleration and torque at intervals instead of every frame (ensuring nice curves are executed undistorted, and that aiming degrades)

 

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement