7 Day Roguelike 2019: Physics and Improved Pathfinding

The most notable feature from tonight is NPCs pre-commit to an action before the player takes their turn. This means the game can telegraph enemy actions to the player, which lets the player better plan ahead in combat.


When an NPC is choosing where to move, it will avoid cells which either currently contain an NPC, or which an NPC has already committed to moving into. This does mean NPCs will tend to be more spread out.

NPCs now only act if they have line of sight to the player, but they do have a higher vision distance than the player, so they can still walk into your visible area. This is a cheap way to prevent NPCs pathing towards the player from the other side of the map.


The player can no longer walk through walls or NPCs. There is basic bump combat, but no damage system yet. I made an animation system so you can see when take and deal damage without the need for a message log.

End of day GIF



I’m going to maintain a wishlist for the remainder of the week, and turn it into a todo list after the 7drl.