# Waves/Precise Intersection

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Precise Intersection of waves are to calculate every hittable angle/guess factor. Normally, people only calculate angular bot width (`Math.atan(18/distance) * 2`), which is perfectly accurate and fine when the enemy bot isn't moving. Anyway, enemy robot have depth and can move. In order to make it more accurate, you need to check the intersection range for the waves every ticks that the wave was intersection. The intersection range can be calculated by the sum of:

• Intersections between the robot bounding box and the bullet wave.
• Intersections between the robot bounding box and where the bullet wave was last tick.
• Any corners of the robot bounding box that lie between these two circles.

In next tick, the enemy robot had moved, therefore you need to calculate the new intersection range. This create an augmented intersection range.

These steps repeated until the wave passed the robot. The final, augmented intersection range will be the full range that can hit the robot in way more accurate than plain bot width.

## Bot using this technique

There are only 4 known robots using this technique, which are

• Garm: The first implementation.
• RougeDC: The original ideas was posted under the name of "Super Bot Width", use only by Gun.
• DrussGT: Current rumble king use precise intersection in the Gun.
• Wintermute: Newer robot, using in both gun and movement.