Week 4 progress


Week 4 gallery | Repo

I implemented combat with some little damage animations. I also added a simple dice roll when calculating defense so there is a bit of randomness in the combat system.

I spent most of the time this week implementing pathfinding from scratch. Started out from a basic A* with an API similar to tcod (although mine only support a single root). Then I added support for incremental calculations in a single pathfinder (can be seen in the gallery). For example the player has a single pathfinder attached where their position is the destination. Enemies that path directly towards the player reutilize that pathfinder and incrementally build the path. By properly reusing cached pathfinders a lot of paths can be reutilized. This is obviously overkill for such a small game, but it was fun to do and can scale up to bigger levels.

I also added a feature for the player to pathfind towards the destination on mouse click. This only utilizes explored tiles in pathing and will stop whenever an enemy enters the vision.

The UI is pretty barebones at this point as I didn’t want to do big refactorings or design for it until I see what else is required in the following weeks. You can inspect tiles and characters and have a small action log.

Get RaygueLike 2025

Leave a comment

Log in with itch.io to leave a comment.