AI Question

For artificial intelligence in my developing roguelike, Space Mercs, I am currently using an adapted version of the Dijkstra Maps as outlined by Brian Walker, maker of the outstanding (and quick-to-play) roguelike Brogue. The way it works is simple enough: you set a zero point somewhere on the map, and all walkable tiles adjacent to that point take on a value of 1, with tiles adjacent to them becoming 2, and so on.


In the above example, the hero (or whatever the NPC’s objective happened to be) would be at the 0. The NPC then ‘rolls’ down the slope from highest to smallest number, eventually reaching 0 regardless of obstacles. This seems to take longer than A* pathfinding, but it has the nice advantage of being infinitely scalable–it takes nearly the same amount of processing power to have 1 enemy tracking your PC as it does for a horde of 15 enemies. When the Space Mercs are being tracked by a horde of xenos, you don’t want lag getting in the way.

If you have done any game development, what systems do you use for AI?

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: