New Movement Algorithm


I rewrote the algorithm for the movement completely. Instead of just using translations relative to the last position, I now generate waypoints on the grid, on absolute positions, each turn and move the actors between them. At the end of each turn I place each actor exactly on its waypoint. I think I am content with the robustness.

The behavior itself doesn’t alter visibly from the last algorithm, so there is no new video, but here is a screenshot showing the waypoints.

The yellow points are used for random movement, the green ones for hunting the player, cyan for spawning new enemies, magenta for the viewing direction of the player and red and blue for the player movement.

At the same time I added some more enemy types: flying enemies, that aren’t completely constrained to the grid (they start and stop on a tile each turn, but can move outside of the six cardinal directions), turrets, that are stationary, but have a long detection range and spawner enemies, that create new enemies (within limits; each spawner has a maximum number of children and stops spawning new ones, once this number is reached. If one of the children is destroyed, the spawner can resume spawning). As before, all models are placeholders.


Your email address will not be published. Required fields are marked *