Oct 4, 2023
Patch Notes - v0.5.2
Significant performance improvements, faster NPC pathfinding, and new debugging tools.
Save files from v0.5.1 are compatible.
Major Performance Boost
We've revamped our game draw loop for incredible speed gains.
- The ground layer is now recreated as needed, instead of every frame, yielding a massive ~200-220%
FPS boost.
- Information about how on-screen entities should be rendered is now cached and recreated only as needed,
boosting FPS by another ~10-15%.
Code Efficiency
- Smarter handling of turn-based updates, which were a significant cause of slowdown when many entities
are loaded. These events don't run every frame, but could be a cause of jitter while moving.
- Optimized redundant code that ran on every frame for a ~2-4% increased FPS.
- Entities with animations or timers are now managed separately for minor (<1%) FPS gains.
Pathfinding
NPCs are smarter and more efficient in how they find their way.
- Reduced frequency of NPC path requests, relying on cached paths, or using alternative faster methods if
it makes sense to do so.
- NPCs now stop pathfinding early if the attempt is taking too long, given the expected distance, and will
instead rely on a faster method.
- A* pathfinding algorithm - we now use a hashmap to check if a node has already been visited, for far
faster performance.
- A* pathfinding algorithm - updated main heuristic used for node selection, for up to 10x performance
boost on long paths (Closest Heuristic -> Manhattan Heuristic).
While providing generally faster performance, these changes should also address the lag
sometimes felt in towns or crowded areas, where many entities are blocking each other and attempting to
path-find at the same time.
Debugging Tools
New game option for those who like to troubleshoot or are facing performance issues.
- Added option "Performance Log".
- Enabling this creates a 'performance.csv' file in the game folder to track resource-intensive tasks.
Use with caution as it could impact game speed.
- If you are having performance issues, please enable this setting and send your files to
doorsoftrithius@gmail.com.