[ian-reeds-games] Re: An audio walkthrough of using the radar

  • From: Ian Reed <support@xxxxxxxxxxxxxxxxxxx>
  • To: ian-reeds-games@xxxxxxxxxxxxx
  • Date: Fri, 07 Jun 2013 12:32:01 -0600

Hey Craig,

I know a little about pathfinding though I find it something I have to reread every time I want to understand the implementation again. I'll admit I'm using a breadth first search for TB which I know is not the most efficient search, but it got the job done and originally I was only using it for very small searches. There is definitely a way to do A* in a grid. Grids are actually supposed to be really easy to use A* in since you have a coordinate system and an easy way to determine if a tile is closer to the destination or further away. The exception is if you have portals that could get you somewhere faster than walking.

Sometime I need to read about A* again. I've never actually implemented it in C#.
If you have a C# implementation I could find it very useful.
I like the book "Programming game AI by example" by Matt Buckland.
All his examples are in C++ but that is where I learned the state machine and breadth first search and converted his examples to C#.

Have you written AI using a state machine, or the composite goal pattern?

Ian Reed


On 6/5/2013 12:45 PM, Craig Brett wrote:
Hi Ian,

Fair enough, like I said I don't really blame you.

My project was essentially to build a turn by turn navigational system using audio, so therefore needing a couple of algorithms in the mix. I used A* as my pathfinding algorithm with my own custom audio algorithm to manipulate sounds, essentially making them work like beacons, but on a turn by turn basis instead of directly to the end destination. I'm not sure how much you know about path-finding, so I won't patrenise you. The slight downside to my implementation is that it's designed for paths, such as streets or roads, where there are clear points for edges and vertexes, roads and intersections, if you like. With TB, I don't know how A* will play with a tile based grid. I've never tried it before. That being said, you already have your own path-finding algorithm, right? The one the enemies use in TB. If you could mod that to guide the user along turn by turn to the end goal, you'd have a very similar effect, if A* turns out to be unworkable with a tile based map. I'd be very surprised if there isn't a pathfinding algorithm specifically for this kind of thing though. I'm happy to help however I can in this. I'm no expert, but I'll gladly share what I know.

Hope this helps clear it up a little. Feel free to ask any questions you may have.

Craig





Other related posts: