Antiswapgun

From Robowiki
Jump to navigation Jump to search

AntiSwapGun

I've test a head-on gun on a basic swap movement; no one bullet follow the right heading cause robot's spin. so I've grub futurePosition and used to predict my next tick position, and eventually correct the gun bearing. Wow, now bullet follow the right path. Then I've modified Albert's future position class to predict enemy movement, and created a liner gun (actually don't predict spin but can be easily implemented). When old wiki will be online (yeah, actually is down!) I will put this test robot in roborumble, I think it will be ranked about 300, and I will improve it to be the base for my next robots and try new trick. I'm sure the "precise shot" will be very usefully for all guns (first of all GF and simple targeting method), specially when enemy is moving in opposite direction or our bot is always on move. Also if we now the right path of our bullet is easier for our team mate evade it.

Code is under RWPCL.

Version 1.0

  1. precise prediction
  2. precise shot
  3. linear gun
  4. virtual bullet
  5. spin movement, no wall avoidance
  6. paint wave
  7. paint enemy future position

TO DO

  1. Extend TeamRobotPeer?
  2. Wash the code :-)
  3. Comment the code
  4. Something else
  5. Reduce codesize
  6. Enemy's shot listener?

You can download jar + source, comment and helps are welcome.