Some UI changes

… and some pathing/reservations changes


Today’s video show how much can be done in a game in a weeks time, once code foundations are done. And what’s interesting is that the biggest change isn’t quite visible.

I’ve spent 8 work days rearranging how miners, farmers and builders select workplace, approach workplace and reserve block to work. The old way was: miner gets mine task, he reserves one of the blocks to mine and he starts to walk towards that block. And this was good, but not perfect. Why? Imagine 4 miners already mining in a mine far away. 5th miner gets mining task and he reserves a block to work. Those 4 will not mine his reserved block because it’s reserved for him. They’ll move on to other places to mine, or even finish the mining task, and this poor 5th miner will still walk towards the reserved block.

Now, it works like this: once miner gets mine task, he’ll first come close to mine location, without reserving any blocks. And he’ll do reservation for his standing and working block once he is close by. So other miners don’t have to wait for him.

In the same time, if another miner gets the same mine task, he’ll check first if there are enough blocks for him to mine. For example, if you marked 3 blocks to mine in a mine further away, and one miner is already on task, the other miner won’t go there. Why would he walk 500 miles and why would he walk 500 more back just to mine one block, when other miner is there.
The same goes for farming and building.

Back to the video. First part of the video shows farming task. Plants growth is greatly exaggerated, so we can catch seeding and harvesting in few minutes. The stone blocks bellow settlers feet is reserved standing place, it helps me debug path finding and location issues.
Second part shows mining task, also sped up. Look at their reserved standing spots

Third part is unloading. Unloading speed is set to really slow, amount harvested to really a lot. So we can test “wait for your turn to unload” phase. If all access point to storage are occupied, and there is no other storage, or other storage space is too far away, settlers will come closer to the chosen storage and wait for access point to free up. And yes, I forgot to add “Face work” function call to unload phase, so they are currently not turning towards the storage. And they have the wrong animation.