Engine Bug, Head on Collision

This Does not appear to be reported on github yet,

If two of my bots Collide head on, it appears to favor my first bot,
I am uncertain if this still holds true in the event where its simultaneous trail collisions.

if two bots hit each other, unless they are in their own territory, they should both respawn.

Hi @WillieTheron , this is by design but the rules are nuanced. Let me try to explain.

Bots commands are processed in the order that they were received. So the first bot to issue a command gets priority. One extreme example might be where two bots run side by side and turn towards each other within the same game tick. This results in a head on collision so how do we decide which bot survives and which one gets pruned? The bot for which the turn command was received first, even if by a millisecond.

And another extreme example on the other side of the spectrum would be, perhaps what you’re encountering. Two bots turn directly towards each other right as the game starts setting them on a collision course which would only happen 50 game ticks later. Again, once they collide the victor is decided by whichever issued it’s command first, even if it were 50 game ticks ago but 1 millisecond before the other bot’s command.

I hope that makes sense?

1 Like

This is awesome,

Since my code is identical,
My first bot will almost always win.

Thank you for this. I set this as closed,
Im okay with the early bird catches the worm, thats fair enough…

1 Like

I do have a follow up question to this.

Can you issue a command, then then replace it with a different command before the next tick occurs?

I.e be first to decide on collision, unless your algorithm later decides that’s unwise.

Not really. I mean, when you issue a command, it is added to your bot’s command queue and will be processed in that order. You can’t cancel a command. All you can do is add another command to come after it, but the first command will have to be processed first before the next one will be processed.

1 Like