Re: Bullet collisions
ncj102 wrote:
> I just started playing around with Robocode a few days ago, and pitted some robots against each other. I noticed that sometimes the bullets collide and then explode. Then I put two "FireTracker" robots, which are stationary and just fire directly at each other, into the arena with the expectation that they would just create fireballs between them as their streams of bullets collide. This didn't happen; the robots shot each other to death.
>
> Now I'm confused...why do the bullets some times explode, but in the situation I created above they didn't?
Bullets are simulated by lines the length of the bullet velocity (which
is 20 - 3*bullet_power). If these lines cross then the bullets collide.
However, if two bots are firing directly at each other, the lines are in
exactly the same direction, and as such can never cross, so they don't
collide.
Hope this helps,
Julian (AKA Skilgannon on robowiki)