[airstrike] Missile "Bonus"

Erik Auerswald auerswal at unix-ag.uni-kl.de
Fri Feb 17 06:54:54 EST 2006


On Thu, Feb 16, 2006 at 10:15:14PM +0100, Ulf Ekström wrote:
> On 2/16/06, Erik Auerswald <auerswal at unix-ag.uni-kl.de> wrote:
> > The attached patch tells the seeker ai about warping. The ai favours
> > warping from one screen edge to the other over turning more than 90
> > degrees. This fine for missiles with a huge turn radius and enough speed
> > to reach its target. It represents a forward looking sensor better than
> > a missile turning around if its target suddenly warps to its back.
> I think I like this missile best, it seems somehow realistic that it
> can only "see" things in the forward direction.

Fine, I'll clean the code a bit and then commit the changes.

> It could be cool to show the targets of the missiles as some crosshair
> marking, so that you know when the missile is targeting you, and if you
> managed to shake it off.

I was thinking about this, too, partly to help debug the code. I can
come up with the code to do this and a simple (drawn) crosshair image,
but I have never used povray (or any other raytracer) so I'd rather have
someone else create the final image.

You will never shake it off cause the AI sees the whole screen (just as
the player), the x coordinate is just adjusted so that the target is in
front of the missile. Therefore the missile does not turn around if the
target suddenly warps behind it.

Of course it would be possible to assign a viewing angle to the missile.
In that case the warping has to be taken into account to avoid shaking
the missile off by just leaving the screen on one side. This would
necessitate aiming the missile towards its target on creation time when
shot by ufo or bonus machine as well (which would look better too).

At the moment you can escape the missiles by leading them into an
obstruction or running away until the missile is out of fuel.

> But maybe it can be made to turn at +-100 degrees or something?

That's no problem. I'll use a named constant to set this value so it
will be easily adjustable.


More information about the airstrike mailing list