wait for the path to clear for 200 ticks before giving up navigation
Since we are only looking for static objects when plotting a path, dynamic objects may end up blocking the way. Those dynamic (as in “moving”) objects might also move away again, to account for this, wait 200 ticks and try again before giving up.
In the above video you can see how the first chair first blocks the way, so the second one waits before it tries again after 200 ticks.
base gamestate ticks on a user adjustable setting, not just “as fast as possible”
Before this, the logic thread was a little out of control. This binds the logical ticks to time elapsed instead. To make things a little more interesting, this also introduces three speed settings (1x, 2x and 10x).
– do not always recalculate positions and rotations even if nothing changes – introduce the concept of object dimensions, orientation (WiP) and isStatic
This introduces the concept of logical object dimensions. This had to be done as objects that do not happen to be chairs may have dimensions other than 1 by 1 tiles. This also means that depending on that size they have to have some sort of offset calculated when positioning them on a field of tiles. It also adds the notion of “static” objects which do, well, nothing except just existing and minding their own business. In other words, that means they will quit the tick function right after entering it.