A* Pathfinding Algorithm

Over the past couple months I’ve spent most of my time working on a tile based game with gigantic fighting robots. Initially I tried to find movement tiles and paths with a brute force search. But it was quite buggy, instead I ended up using the A* (A Star) Pathfinding Algorithm for my tile game. To learn how it worked I built a fully interactive A* demo that you can play with.

A Star Pathfinding
View the interactive A* Pathfinding demo now.

The A* demo allows you to build paths with blockers and different tile heights. Demo includes details on the searches measurements and a general overview of how it works. You can download the source code to help build your own implementation.

3 thoughts on “A* Pathfinding Algorithm”

  1. good piece. Spector is one of my heroes and Deus Ex one of my fatreivos. I remember replaying one of the early sections because the people I respected didn’t like the way I’d been doing things, and the people I didn’t respect were all hell yeah, blow them away. One of the few games where I genuinely went out of my way not to kill people, at least for about half the game.I remember Deus Ex 2, in development, and Spector kept saying things like well, it’s not my game. One of the things I liked about Deus Ex original is that it had both skills and the modules which made sense to me. I feel like modern games, which keep reducing the RP systems, think players are idiots. In Deus Ex the choices I made about upgrading my character mattered, and there were a lot of ways to do it. It’s one of the three things that disappointed me about Deus Ex 3 (the other 2 being the boss fights and the end of the game, which was AWFUL (and then repeated by ME3, nearly ruining the entire trilogy for me.)

Leave a Reply

Your email address will not be published. Required fields are marked *