A* gets the Gold Star

While working on my RPG, I developed a number of ideas for how to make “AI” to go towards things, but I realized that I also needed a “perfect” solution as well.

It’s somewhat acceptable for monsters to get stuck on walls or confused about tracking you down, after all the undead have half rotten zombie brains and lizard men never place very high in the spelling bee (is that racist?). So it makes sense they would get tweaked out occassionally.

So when is it not ok to have imperfect pathing? When the user clicks on a spot on the board, they expect their guy to walk there. If not, it really breaks the illusion that the little guy on the screen is them and suddenly you have the suck.

Luckily A * (pronounced “A star”) is really easy to implement and does a good job of getting from point A to point B.

Sweet!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: