Log in

View Full Version : Pathfinding



The_Mark
02-19-2005, 11:51
When struggling with the fort problem I stumbled upon an interesting folder: settlement_plans/street_plans. The files inside seem to contain the pathfinding nodes for each city size and type ("pathfinding_roman_town.cas" for example), but I don't have .cas-supporting programs so could someone confirm this?

Sundjata Keita
02-19-2005, 17:52
Yes these files I presume are layouts and are probably used for pathfinding (not really a confirmation I know but I have looked at them before and I guess if you edit them it will really mess things up)

The_Mark
02-19-2005, 20:30
if you edit them it will really mess things up
I hope not. I think they might well be worth of research, if anyone's willing, as this might finally give us the chance of having a decent, not-ruined-by-pathfinding siege.

Seth Krn3ll
04-09-2008, 14:44
Hello there.
I'm working on pathfinding, and I have a few questions:

1. what kind of objects are used to make the links and the nodes? Are them planes or some other 3dmax objects?

2. what are the rules to connect them? Its enough if they match on edges or do have them to match on specific points?

3. their width is fixed or can be changed? I mean, can I make huge or very small paths on the map?

4. are them used only as AI controlled unit movement indicators or are them actually limiting movements for player controlled units?

5. do they have to macth precisely (I mean, by single pixel) the roads on map?

If someone may answer, thanks in advance.

Thor the Bassist
04-09-2008, 17:05
Pathfinding - very simple thing.

One cas file as you have already said and it doesn't need to be converted to anything which is good.

What it does. The pathfinding creates NO boundaries - units can totally disobey the pathfinding if you tell them to leave a specified route though the AI will try to stick to them as much as possible (they are like highways/motoways - you want to spend the majority of your journey on them and only leave them at the beginning or end of the journey). The boundaries are made in collision files. What pathfinding should do if created right is it should allow a player to click on the other side of a city and the units will automatically take the shortest route through the city but going along the streets. The AI will not automatically tell troops to avoid areas they cannot pass such as through collision blocks so without pathfinding info the troops will simply run straight at the building and then get stuck running at a brick wall.

The pathfinding is made from nodes and links. A node is a small rectangle at which links meet. Links should connect between nodes in straight longer rectangles. They are done in max as planes which overlap. The nodes are labelled node_x and link_x (I think, try importing a pathfinidng file to see) where x is a one or 2 digit number.

There is not need for the rectangles or squares to be a certain widths, they must simply overlap, they need not match by point or edge and they have no link to road maps (I actually have no idea what road maps do and have done successful maps without needing road maps.