Pathfinding
Author: Josh Keith
Posted on 11-15-2023
Issue: Pathfinding
The pathfinding was not updating or generating a path to the node correctly. When moving the mouse over other tiles, the pathfinding would break altogether and ruin the game experience for the testers. This was due to not clearing all the queues and containers needed for the pathfinding between each path update.
Solution:
After debugging with a teacher, I realized I had some issues causing these problems. The first issue was that the containers and queue were not getting cleared each iteration of the pathfinding update. This left some tiles and nodes to be searched along with the new tiles and nodes, causing weird behaviors and errors. I started clearing the queue and container updates to fix this, which removed those problems. The other issue was the get solution function I had written wasn't getting called correctly because it was not in the correct spot in the code. I was checking for the end node in my update function, and when I found it, I returned out of that function without calling the get solution, causing the path not to appear. The solution was to move that function just before return so that the player could see the path found.
Get Quest for Dominion
Quest for Dominion
Status | Prototype |
Authors | Quest for Dominion, rdionian, RaGinCagin, Jkeith, acefizz, PhantomIsobel |
Genre | Adventure |
More posts
- Button SoundsMar 01, 2024
- Bug Battles: Last ShowdownFeb 29, 2024
- Feedback and Final Debugging touchesFeb 24, 2024
- Tutorial TrialsFeb 23, 2024
- Tab Menu BugFeb 23, 2024
- Tutorial TriggerFeb 17, 2024
- Tutorials and Bug FixesFeb 17, 2024
- Teaching the User CombatFeb 16, 2024
- Coming to an EndFeb 10, 2024
- Nothing Much 2.0Feb 10, 2024
Leave a comment
Log in with itch.io to leave a comment.