I still don't get it :) ...

Jump to navigation Jump to search

Oh, I missed that part of your confusion is how the vectors get used. You don't select "which one" to fire at - each of them produces a firing angle, and then you do a kernel density calculation on all the firing angles to decide where to shoot. At least that's what I do, for both GFs and displacement vectors. This can be a really simple calculation, like:

  • Look at 59 evenly spaced angles from GF -1 to 1 (Math.asin(8 / bullet speed) yada yada).
  • For each one, count how many of your firing angles are within half a bot width (roughly (18 / distance)).
  • Fire at the angle with the highest count.

I do something a little fancier, with some smoothing and weighting the count by the scan distance calculation, but you get the idea.

Voidious19:09, 17 August 2012