Pathfinding
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?
Thanks
-Namoreh
Thanks
-Namoreh
Search for A* ("A-star") on Google. Should turn up about 1000000 tutorials
There were a few articles about path finding recently on AIDepot... You can still find them in the features section:
http://ai-depot.com/Features/
But A* is something so usefull you should still look at it. It's used in many path finding strategies anyway.
http://ai-depot.com/Features/
But A* is something so usefull you should still look at it. It's used in many path finding strategies anyway.
cool, I got pathfinding working!
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).
Thanks
-Namoreh
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).Thanks
-Namoreh
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*.
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,
-Namoreh
thanks for the help,
-Namoreh
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
) but I'll be spending the rest of the day on the other units animations, and on the swordsman's death animation.
See-yah-when-i-see-yah,
-Namoreh
) but I'll be spending the rest of the day on the other units animations, and on the swordsman's death animation.See-yah-when-i-see-yah,
-Namoreh
I'm not sure you'll have a problem finding willing and able beta testers
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.
Respect,
-namoreh
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.
Respect,
-namoreh
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Thoughts for 3D A* Pathfinding | gwihlidal | 4 | 4,109 |
Apr 21, 2002 09:38 AM Last Post: Jeff Binder |
|

