[Home]HowTo

Robo Home | Changes | Preferences | AllPages

Showing revision 14
How to figure out the maximum location (x and y) that an enemy robot can be by the time my bullet gets there (according to distance and firepower)? - AvihooI edit: Come to think of it, there should also be a minimum location (if the enemy robot goes the other way).

What about the distance? -- AvihooI

Well, there are basically two approaches to targeting. You can either predict where the target is going to be (simple targeters, pattern matchers) or you can fire at the angle that is most likely to hit (based on past observations). The calculation Voidous gave comes from the latter approach, used when scaling prior successful angles to the range of possible angles that the target can get to. The location of impact (or distance to it) isn't really a direct concern for that targeting approach, just the angle (relative to dead-on) of fire.
If you want to predict where your opponent will be, you are going to have to assume a movement behavior (linear, circular, match to previous pattern) and plot out each tick's location one at a time, until the bullet has enough time to arrive at the target's location. Then you aim for that intercept point and fire (on the following turn). Even though predictive targeting is easier to code, it takes more time to process, at least for me. -- Martin


Robo Home | Changes | Preferences | AllPages
Edit revision 14 of this page | View other revisions | View current revision
Edited March 13, 2006 21:49 EST by Martin Alan Pedersen (diff)
Search: