Talk:Linear Targeting

From Robowiki
Revision as of 23:43, 16 March 2009 by Awesomeness (talk | contribs) (Linear targeting disovery!)
Jump to navigation Jump to search
Credits - Example of Noniterative Linear Targeting
Old wiki page: LinearTargeting/NanoLinearTargeting
Original author(s): Kev



I find the noniterative targeting 100% accurate aside from walls if you replace the 13 with a 10. I was fooling around with the code to try and make it more accurate, and I made a discovery! New code:

double absoluteBearing = getHeadingRadians() + e.getBearingRadians();
setTurnGunRightRadians(Utils.normalRelativeAngle(absoluteBearing - 
    getGunHeadingRadians() + (e.getVelocity() * Math.sin(e.getHeadingRadians() - 
    absoluteBearing) / 10.0)));
setFire(3.0);

Does anyone else get the same results? I hope so. If it does, I'll be... remembered! For a very small thing... But... But I'll be like, on a very small scale, like ABC, like all of the "Robocode scientists", I will have made a discovery! I'll be so happy with myself! =') --Awesomeness 22:39, 16 March 2009 (UTC)

Also, I have found that if it remains 13, but the firepower is adjusted to 2.0, it is also 100% accurate. --Awesomeness 22:43, 16 March 2009 (UTC)