« Return to Thread: Firepower

Re: Firepower

by Thomas Dalton :: Rate this Message:

Reply to Author | View in Thread

2008/12/18 Grant Slatton <legoman1102@...>:
> Well it's my third day robocoding/learning java, my primitive movement
> system [less than 10 lines of code] is actually not horrible, my
> targeting system needs work though. To determine how much power to
> use in a shot I just made up the simple equation 4-distance/200, is
> this a good or bad idea.
>
> BTW so far my robot is pretty bad, I win roughly 5 percent of the
> games against Tron and have yet to beat dookious once.

Power isn't as important as aim (but you have the right idea for power
- less power when the target is further away so the bullet goes
quicker and there is less time for the target to move). For ideas of
how to aim, check out http://robowiki.net/cgi-bin/robowiki?Targeting
(Linear targeting and Circular targeting are both pretty easy to
implement and can dramatically improve your results against simple
enemies [against more advanced enemies, they often aren't much better
than head-on targeting].)

 « Return to Thread: Firepower