Creep squashed by spawning creep when other spots were available
-
Replay link: https://screeps.com/a/#!/history/shard2/E32S8?t=4683420
My creep is adjacent to an Samrr's spawn that spawns a creep on the following tick. There is a spare tile for that creep to spawn into, but it spawns into my creep killing it in the process. I think the issue may be related to the fact that both of the enemy creeps adjacent to the spawn move on this tick.
I am not sure exactly how you would reproduce this, but I expect its related to the creep movement around the spawn.
Thanks
-
@stevetrov It might also happen if
directions
only allows the new creep to spawn onto yours
-
I am not sure how this works with directions, but that did cross my mind and the spawn was trying to spawn in the TOP direction, but spawn that was blocked so it spawned BOTTOM_LEFT squishing my creep in the process.
-
@stevetrov Actually looking again, it looks like it was probably due to trying to spawn in the only empty space to the left of the spawn, but the other creep had moved first, which leaves no open spaces (since it doesn't have the new creep positions, just the fact that it couldn't move to the left)
-
it is worth noting though that I think it might be possible to force a spawn stomp using
directions
-
It feels like the easiest solution is for the spawn to spawn into an tile that is empty at the start of the tick, and for the new creep's move to take priority over all other moves.
If there are no free tiles but one or more tile has a hostile then it should spawn stomp.
-
Another instance of same issue, link for tick immediately proceeding event: https://screeps.com/a/#!/history/shard2/W9N41?t=5263598
Edit: Oh I see what happened to me was not the same issue. There was nowhere else for the enemy creep to go