creep move order
-
When multiple creeps more to the same position, how do you decide what happens? Is it a stack, last to call a move method gets there?
Can't find the answer anywhere.
-
There isn't.
Because all you send is basically a "wish" to move there, the server is the instance who decides that based on all inputs given.Since there is so much going on on the server side you can call it basically random.
-
https://github.com/screeps/engine/blob/master/src/processor/intents/movement.js
https://github.com/screeps/engine/blob/master/src/processor/intents/creeps/move.js
its not random, but its complicated.
-
I think it's roughly, Creeps blocking other creeps get priority. Then its pulled creeps, then pulling creeps, then whichever creep has the better move to weight ratio. PowerCreeps loose all ties.
-
I think the server could be AZing or ZAing, but you could just array, sort and loop through in a specific order. Having the control over which goes and when.