Streak Club is a place for hosting and participating in creative streaks.
Today I worked on the initial unit movement, no transitions just pick up and drop. You can quick cycle through the units with the "." key. I did add a possible movements highlight but as you can see below this is entirely ignored. Also the world's bounds aren't adhered to...
Tomorrow I'll look into actually calculating tile type cost and distance cost. I'll need to calculate the cost to every tile on the map from the unit's current position. I think that would involve some dijkstra? Not sure, never done path finding.
daily from
Post a comment
Well with a* it basically chooses a direction using info about where the goal is. I'm guessing you can do dikstra just in all directions until you have covered the region you are searching, and store all of the costs in the tiles as it searches.
@saluk Yeah looking into it a* is a more efficient dijkstra for finding the shortest path to a target. But what I really want is to calculate the cost to all nearby tiles, I'm hoping to find a way to do that without having to just run a* on each tile as I imagine that might be a touch expensive.
It's funny, I've always done a* and never dikstra, when a* is an advanced version :) As many times as I've implemented pathfinding, I still don't really have it internalized. I think dikstra is what you want though.