Difference between revisions of "Head-Fake Targeting"

From Robowiki
Jump to navigation Jump to search
m (forgot to copy description)
m (removing "Targeting" category)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This targeting method is intended for use against opponents that try to head-fake you by heading one way, then reversing direction once they detect that you have taken a shot.
+
This [[targeting]] method is intended for use against opponents that try to head-fake you by heading one way, then reversing direction once they detect that you have taken a shot.
  
== Quick and Dirty==  
+
== The fast way to code it ==
 +
Take any targeting method you already have (other than [[Head-On Targeting]]) and find the predicted difference in angle from dead-on, then shoot at the opposite angle. For example, if the opponent is at 15 degrees and your circular targeting says to aim +20 degrees, you would normally fire at 15 + 20 = 35 degrees. With Head-Fake Targeting, you fire at 15 - 20 = -5 = 355 degrees.
  
; The fast way to code it.
+
== The proper way to code it ==
 
+
Create a new targeting method based on any targeting method you already have (other than [[Head-On Targeting]]).  Assume your opponent will accelerate at top speed in the opposite direction.  Extrapolate his position using your targeting algorithm until you have an acceptable firing solution.
Take any targeting method you already have (other than [[Head-On Targeting]]) and find the predicted difference in angle from dead-on.  Shoot at the opposite angle (compared to dead-on).  (e.g. your opponent is at 15 degrees, your circular targeting says to fire at +20 degrees, you fire at 355 degrees.)</p>
 
 
 
== Realistic ==
 
 
 
; The proper way to code it.
 
 
 
Create a new targeting method based on any targeting method you already have (other than [[Head-On Targeting]]).  Assume your opponent will accelerate at top speed in the opposite direction.  Extrapolate his position until you have an acceptable firing solution.
 
  
 
[[Category:Simple Targeting Strategies]]
 
[[Category:Simple Targeting Strategies]]

Latest revision as of 17:10, 29 November 2007

This targeting method is intended for use against opponents that try to head-fake you by heading one way, then reversing direction once they detect that you have taken a shot.

The fast way to code it

Take any targeting method you already have (other than Head-On Targeting) and find the predicted difference in angle from dead-on, then shoot at the opposite angle. For example, if the opponent is at 15 degrees and your circular targeting says to aim +20 degrees, you would normally fire at 15 + 20 = 35 degrees. With Head-Fake Targeting, you fire at 15 - 20 = -5 = 355 degrees.

The proper way to code it

Create a new targeting method based on any targeting method you already have (other than Head-On Targeting). Assume your opponent will accelerate at top speed in the opposite direction. Extrapolate his position using your targeting algorithm until you have an acceptable firing solution.