Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - SoulForged

Pages: [1]
1
Creative Projects / Pathfinding:
« on: December 23, 2009, 09:27:35 am »
I'm working on a turn-based roguelike in c, but i'm stuck on the pathfinding; and i would like a little help here:
I have some mosters and a hero, some walls etc. The maps are generated in a semi-random way; and i need some sort of AI to find which way to go to get to the hero in the fastest way. I tried creating differents kind of AI, but most of them aren't applicable in a random map, and the only one AI (i can think of) that works on all kind of maps just tries everything and writes down how many turns would take if the monster choose that way, then decides to go for the shortest..
The problem should be solved but an AI of this kind in a pretty big map, with several different monster would take too long to process.
Can you guys let me see some kind of codes (possibly in c since is the only programming language i'm confident in, or some other language that's pretty similiar to it) that handles the AI for pathfinding?
Thanks in advance.

Pages: [1]