Adventures in A* pathfinding
A key part of nearly any video game involving things that move around in an intelligent fashion is an algorithm called A*.
Older games relied on fairly simple techniques for moving things around; patterns of movement, perhaps modified with random number generators, maybe moving towards the player’s position if an enemy or down the screen if a powerup. But once obstacles began to be introduced to the playing field it became necessary to figure out ways to move things around them, and A* fits the bill nicely. Give it a starting point and a destination, and it will happily build you a list of adjacent points between the two.
I guess I’m not really stating anything new here since the algorithm’s been around since the late 60s, but it’s really just an excuse to post some video of my own foray into implementing A*. It occurs to me that this could be the software developer’s equivalent of boring people with vacation pictures, but whatever.
[ ... 1960 more bytes remaining; click "Read entry" to view. ]