I’ve got a tile based map and I’d like to get a decent method to calculate all the possible squares that the unit may move it.
Lets say that the unit can move 5 spaces.
Each tile has a movement ‘cost’. So some tiles are harder than others to pass through.
Im trying to come up with a good method so that if you click on the unit, it will show all the possible locations the player can move.
I’ve been searching and I keep findind pathfinding A to B algorhythms, but nothing as general as what Im talking about.
I guess I could use A star and calculate the current player square vs every square on the map, but that seems wasteful.
I was trying to figure it out without posting here, but oh well. Hopefully someone else has done this before!
Thanks in advance!