iDevGames Forums
Pathfinding - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Design (/forum-5.html)
+--- Thread: Pathfinding (/thread-7641.html)

Pathfinding - Namoreh - Aug 1, 2002 07:06 PM

in a strategy game I've been working on I need armies to be able to navigate the roads to find the shortest route to a city, without straying from the roads. I can move them one city at a time currently, I can move them to a city directly connected via a road, but i need the army to be able to figure out if i click on a far away city the route it must take e.g. from city 3 to city 4 to city 5 and then to the destination city.does anyone know of a good way of doing this?


Pathfinding - OneSadCookie - Aug 1, 2002 07:11 PM

Search for A* ("A-star") on Google. Should turn up about 1000000 tutorials Smile

Pathfinding - ylaporte - Aug 2, 2002 05:08 AM

There were a few articles about path finding recently on AIDepot... You can still find them in the features section:

But A* is something so usefull you should still look at it. It's used in many path finding strategies anyway.

Pathfinding - Namoreh - Aug 2, 2002 11:49 AM

cool, I got pathfinding working! Grin It took all morning and some of last night to get it right, but i can now move my armies around! now i just need to make the enemy AI, finish the battle engine, and implement TCP/IP for network games. I think I should be done in about a month, based on how fast I've been mowing along, making a checklist of features really helps, I've found, and telling yourself you can't eat until you can recruit 20 archers without the game crashing (which I fixed).


Pathfinding - GoodDoug - Aug 3, 2002 10:49 AM

I wouldn't use A* for this, as its a simple graph problem, and using Dijkstras Search or a BFS will give the results you need without the mess of tuning A*.

Pathfinding - Namoreh - Aug 3, 2002 08:09 PM

ha, i actually am using Dijkstra's, the page i found talked about A*, but actually focused on dijkstra, so i used their example of dijkstra's searching thing and used it for the game. right now im working on the animations for the units (walk, run, attack, die1, die2) there are 4 units (swordsman, spearman, axeman, archer) and maybe a fifth (knight) then I have to make the Generals' graphics, then finish up battle engine, then tcp/ip, then testing.

thanks for the help,

Pathfinding - Render - Aug 3, 2002 10:39 PM

Well, if ya need beta testers... Wink

Pathfinding - Namoreh - Aug 4, 2002 09:00 AM

You can definitely beta test once I'm done, I'll need a few other people, on 9 and X, but first I gotta get finished with it, so hold on, it'll be a few weeks, I gather. I finished the swordsman's walk and attack animations yesterday (I spent most of the day playing Medal of Honor: Allied Assault, though Rasp ) but I'll be spending the rest of the day on the other units animations, and on the swordsman's death animation.


Pathfinding - ylaporte - Aug 4, 2002 07:03 PM

Well, if you need beta testers I'd be honnored to test it on X... Smile

Pathfinding - ededed - Aug 17, 2002 01:45 PM

Beta testing certanly my thing I beta test all the games I make. Rasp

Pathfinding - Josh - Aug 17, 2002 06:23 PM

I'm not sure you'll have a problem finding willing and able beta testers Smile

Pathfinding - Namoreh - Sep 3, 2002 12:57 PM

Alright, project is sort of canned, but not really.
I'm using alot of the code from it to create an RTS engine (I'm currently deciding whether to call the Engine "Pain100" "Tape100" or "Boot100"). Then I'll use this RTS Engine to create a game, and maybe I'll release the engine. Anyways, if Carlos is interested I could provide an Axeman, Spearman, and Swordsman for iDG, in walking animations, and death animations, trust me though, you'll want me to redo the attacking animations. Here's an example (created in Cinema4D) of the Axeman.


Pathfinding - ededed - Sep 3, 2002 01:22 PM

Nice graphics, cool. I like that axeman!