Jump to content

Historically Accurate Pathfinding


Recommended Posts

I have been thinking about pathfinding. I know this may not jibe with the way other RTS' handle things, but we are aiming for more historical accuracy, right? I haven't given thought to how this would be implemented, but maybe it is worth investigating.

So normally when someone sent out a large army for attacking, they wouldn't really take the direct route, through rivers and forests, but they would take the roads, right? So if we established roads in the game it wold make pathfinding much easier since most long trips would take the road across the map at least as far as they could.

If someone did want to stage a surprise attack and come a different direction you would expect that to take more interaction from the player, specifically dragging them off of the road, and then directing them how to go.

It seems another inaccuracy we have is how units seem to try and find the shortest path even through the fog of war. In the case where a unit was sent deep into unexplored territory wouldn't that unit only be able to take the best route a tile or two at a time? It would depend on its line of sight. Units in real life entering unexplored territory would be expected to hit dead ends and have to turn around. Maybe scout units could get some more distance due to a sense of knowing the best way to go.

Then we could also make distinctions between fighting on land where the geography is already known (as well as roads and their paths) vs unexplored territory where everything starts as a mystery.

Anyway more food for thought...

  • Like 1
Link to comment
Share on other sites

So normally when someone sent out a large army for attacking, they wouldn't really take the direct route, through rivers and forests, but they would take the roads, right? So if we established roads in the game it wold make pathfinding much easier since most long trips would take the road across the map at least as far as they could.

While this may be true in most cases, there are some exceptions. For example: Celts and Iberians were experts at ambushing roman armies along the roads. I agree that it would simplify things, for now, but someone eventually will have to do the hard work of accelerating the pathfinder, since not everyone wants/likes/needs to walk on the roads and some modders may not like the idea of roads.

Walking on roads could be encouraged, though, by decreasing stamina expense of actions and increasing moving speed considerably. And maybe a simple button to alternate between walking only in roads and walking through the woods. I agree with you too about the unexplored territory, but this shouldn't be implemented before the auto-explore feature, else it will be a pain.

Link to comment
Share on other sites

If the person controlling the army really wants to use roads, then they can just walk their units down the road. Personally I like to move my armies around in a slightly roundabout way to attack, so that the enemy doesn't see it coming.

Also the new pathfinder uses the JPS algorithm, which only supports uniform-cost grids (but is crazy fast). This means that roads will have the same cost to travel over as mountains, which seems a little weird but works just fine in practice.

  • Like 1
Link to comment
Share on other sites

Cossacks II uses roads in an interesting way. Might be worth taking a look if this is a serious idea. I liked the way roads worked in that game - namely for marching armies across the map quickly without loss of stamina/morale and then the fighting took place when armies met.

Link to comment
Share on other sites

I REALLY like the idea for units to be slower going over non road areas! Give certain factions (Iberians, Celts, Ect) the ability to travel the same speed as if they were on roads over all terrain. This would encourage players to learn about each faction, therefore adding strategy. And perhaps add certain units for factions without that bonus that would have the ability to cover none road terrain faster.

Link to comment
Share on other sites

Hmm... This kind of thing was originally in the game, but was taken out in one of the alphas by Philip (I think). This was done to simplify pathfinding. Also, as a multiplayer gamer, I don't see how players will have time to build roads when they have 100 other things to take care of. :) Though, I could definitely see including roads in scenarios.

Link to comment
Share on other sites

Hmm... This kind of thing was originally in the game, but was taken out in one of the alphas by Philip (I think). This was done to simplify pathfinding. Also, as a multiplayer gamer, I don't see how players will have time to build roads when they have 100 other things to take care of. :) Though, I could definitely see including roads in scenarios.

in ROn was automatic the roads, they formed fo where units was passed between cities. but i dont know if that can slow performance.
Link to comment
Share on other sites

I think this is something that should be decided in the atlas (per map). If you could draw cost fields (which are in some way needed, doesn't matter if you use A* or flow fields) in Atlas, then you could make that swamp is slow to go through, and what you colour as road is fast to go through.

Of course, automatically generated cost fields are nice (like making hills slower than flat terrain), but hand drawn cost fields could make maps more interesting.

Link to comment
Share on other sites

Once stamina is added properly terrain could easily be more important. Things like cavalry not being able to charge through forests/swamps, or long distance marching lowering stamina so charges become difficult/impossible. With roads allowing long distance travel without affecting stamina it would provide more tactics and strategy. There's the option of making terrain even more interesting by making ranged units have a shorter range in forested areas if it's not too complex to add. Or formations can't be used in forests. I always find in games that the more you can use terrain to your advantage the more fun it is. If walking along a road, or standing in a forest, makes no difference to the battles then all it will be is eye candy (and resources in the case of trees). What could/should be added out of the many possibilities is the main question though!

I'm not sure whether being able to build roads would be used enough to warrant adding. I think I'd prefer them to be already present on certain maps. As long as all maps have a few routes that are good for marching then i think that would do.

Edited by J-Dx
  • Like 1
Link to comment
Share on other sites

I'd personally like to see more "historically accurate pathfinding" in regards to formations. Specifically, how units move while in formation and how they get into and out of formation under different circumstances.

For instance, when you have 30 hoplites in a standard "line" or "box" formation, and then you change them to "Phalanx" formation, they would move into place naturally and by rank and file. Also, when moving a large number of units over a long distance, they would group together by type and formation, then form into a column, then move out to the destination (with a speed bonus and armor debonus). The column would "snake" around the different way points (rather than the current behavior where the 'wheel' around unnaturally). Once near the destination they would break up into their proper formations and form up into a proper battle line automatically (pikes in front, archers behind, cavalry on the wings, skirmishers and swordsmen the "hinges" between the cavalry and pikes, elephants spaced out in front, etc. This could be customized depending on the civ, for instance, Rome's "battle line" would arrange somewhat different). Things like that.

Different units would have different amounts of "professionalism" meaning they would be more or less organized. E.g., Spartiates would have a high amount of professionalism, so they stand in nice, neat straight lines, while their Helot skirmishers would have a low amount of professionalism and would stand in messy disorganized lines.

First, though, the formations need gone through and reduced in number, IMHO, and their behavior and stats finally decided so things like the above can be properly tested.

  • Like 1
Link to comment
Share on other sites

I think this is something that should be decided in the atlas (per map). If you could draw cost fields (which are in some way needed, doesn't matter if you use A* or flow fields) in Atlas, then you could make that swamp is slow to go through, and what you colour as road is fast to go through.

Of course, automatically generated cost fields are nice (like making hills slower than flat terrain), but hand drawn cost fields could make maps more interesting.

JPS (the algorithm the new pathfinder uses) only supports uniform-cost maps, so this isn't possible with the new pathfinder (although it is possible with the current pathfinder).

@Mythos_Ruler: Your post gave me an interesting idea: what if formations could be combined? e.g. you have a phalanx of spearmen and a line of skirmishers, you could combine the phalanx and the line into a box formation which would keep its component formations. Whenever you moved all of those units, the skirmishers would move in a line behind the spearmen.

Link to comment
Share on other sites

  • 2 weeks later...

I like the idea of roads, but might that not complicate the game? Look where army is going, if it is following the road/ be careful to take the road/ and so on...

Especially that then not much civ had real roads, only maybe muddy paths. It could be a roman bonus; they have faster roads. And I think there should only be 1-2 built-in roads, so that you don't have a big road-net that destroys the map.

I like the idea of mythos_ruler. Now if you send an army its a big column that goes zig-zaging through the map like a pice of wood. Maybe roads could change the anatomy of these columns; when you use a road the column becomes more snake-like with the soldier following exactly the road!

But how do you say when to take back old formation? when your already surrounded by enemies ;) ?

Edited by greenlaser
Link to comment
Share on other sites

Torffinnis is right may be some extra buildings can be do for extra gameplay. Some one suggest in past a well to restore the hp and stamina. That could good idea as a eye candy that gives bonus in a map.

The well can work as resource, can be Gaia building, that if capture gives to your troops a some hp restoring and stamina fast restore.

sorry if, is so "topic off" of this matter. but he is right.

Edited by Lion.Kanzen
Link to comment
Share on other sites

Like Mythos_Ruler, I think roads already set in the scenarios would be easier than the need to build them during the game. Everytime I play 0 A.D., I feel I haven't the time for everything, so I hardly see myself building roads.

But why not having a few scenarios set with a slower pace and where you have more time and then can patiently build your roads ? I think that would be an interesting thing to explore, at least with the kind of civ that was very busy with roads, like Rome.

Link to comment
Share on other sites

Like Mythos_Ruler, I think roads already set in the scenarios would be easier than the need to build them during the game. Everytime I play 0 A.D., I feel I haven't the time for everything, so I hardly see myself building roads.

But why not having a few scenarios set with a slower pace and where you have more time and then can patiently build your roads ? I think that would be an interesting thing to explore, at least with the kind of civ that was very busy with roads, like Rome.

I'm all in favor of different game modes, as long as we focus on the making the "default" gameplay first. I could envision a "builder" mode that adjusts train times and build times and costs in order to encourage a more deliberate pacing, in a more "city-builder" kind of way. It's just a matter of getting everything else done first and balanced before we can add more game modes.

For now, I think we want/plan:

Default ("Supremacy"?)

Death Match

No-Rush (with a variable attrition time limit set by the host)

Herocide

Everything else beyond that is "extra" in my mind.

Link to comment
Share on other sites

Is there a design document on these modes? I must admit I'm not entirely sure what each one means, like Death Match vs Supremacy...

My favorite mode was Rise of Nations Conquer the World, where it played like Risk but then you went in to fight each actual battle. It gives the game infinite playability, especially when you could make an ally who would provide you with a teammate in battle. There are infinite possibilities

For real historic accuracy I think we would need a system where you travelled slower through a swamp or forest than down a road, but I agree fixing the lag is top priority, the game has to be fun to play above all else.

Link to comment
Share on other sites

Is there a design document on these modes? I must admit I'm not entirely sure what each one means, like Death Match vs Supremacy...

My favorite mode was Rise of Nations Conquer the World, where it played like Risk but then you went in to fight each actual battle. It gives the game infinite playability, especially when you could make an ally who would provide you with a teammate in battle. There are infinite possibilities

For real historic accuracy I think we would need a system where you travelled slower through a swamp or forest than down a road, but I agree fixing the lag is top priority, the game has to be fun to play above all else.

Supremacy is the standard mode we have now with territories. Death Match would be similar to Supremacy, but have a lot of starting resources and its a common mode in RTS games. Mythos has mentioned before that there could potentially be a mode without territories.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...