.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Wish List: Routing (http://forum.shrapnelgames.com/showthread.php?t=33201)

Psientist February 6th, 2007 01:16 PM

Wish List: Routing
 
I've played other turn-based strategy games like Civilization, Call to Power, and Warlords that have had one nice feature that reduces micromanagement: army routing.

1. select an army / commander.
2. click / drag a route to a destination, which may take numerous turns to traverse.
3. The army follows that path on its own without the player having to babysit them every turn.
4. When the army arrives, the player gets a message.


Wouldn't that be a nice feature?

merlinme February 6th, 2007 02:26 PM

Re: Wish List: Routing
 
Yes, a very nice feature. Anything which reduces micro management is a good thing, in my opinion. However it would require building some route finding into the program (taking into account the speed of the army, any difficult terrain, whether the army has flying or sailing, etc.)

Also the programmers have to decide what should happen if the route gets blocked for some reason (i.e. a province changes hands). Personally I'd be happiest for the unit to stop moving and tell you why, rather than attempting to find another route, let alone launching an attack!

Conversely a much quicker route may open up if you capture a province, but in that case I think it's up to the player to realise and change the moving unit's orders.

Maybe we'll get something for Dominions 4...

Graeme Dice February 6th, 2007 03:45 PM

Re: Wish List: Routing
 
Quote:

merlinme said:
However it would require building some route finding into the program (taking into account the speed of the army, any difficult terrain, whether the army has flying or sailing, etc.)

This is a trivial programming problem for a system where your units don't block each other. An A* search is simple to implement, and takes into account all of these factors.

Gandalf Parker February 6th, 2007 04:34 PM

Re: Wish List: Routing
 
That would be alot of thinking on a pbem system. Anything that carries beyond one turn would be pretty involved to put in since its just not setup for multiple turn actions. It took us forever to get simple "memory" things that just carries it over to the next turn and treats it as the same command given again with no extra thinking (like monthly casting or build queues beyond one turn).

I wouldnt mind that much thinking and file handling on an MP game. I dont care how long the hosting takes since Im usually in a "one turn a day" game. But on a solo game with lots of provinces and AIs, or a blitz game with lots of players, I think that would be too long a hosting for even me to put up with.

Graeme Dice February 6th, 2007 06:20 PM

Re: Wish List: Routing
 
Quote:

Gandalf Parker said:
That would be alot of thinking on a pbem system. Anything that carries beyond one turn would be pretty involved to put in since its just not setup for multiple turn actions.

Why on earth would you worry about saving path information between turns? You run the pathfinding algorithm every turn for every unit. Pathfinding in a system like Dominions is simple, since the best path is not affected dynamically by the current position of other units. This is especially true for a sparsely populated graph like a typical Dominions map. I'll use a concrete example to illustrate how you don't understand the issues involved. Civilization 3 & 4 are games which have similar numbers of individual units to Dominions, and which have far more densely populated graphs (8 possible movements for every single square). In a single turn of either of these games (Or just about any other strategy game), every single unit can be told to find a path to any legal destination anywhere on the entire map, with no noticeable slowdown.

Further, the real blow to your claim that pathfinding for human players would somehow add overwhelming computational time, is that the AI already performs these calculations every turn. As any player of Dom3 would be able to tell you, the "AI thinking" phase of turn generation is by far the shortest phase.

Gandalf Parker February 6th, 2007 07:13 PM

Re: Wish List: Routing
 
I dont think civ 3 and 4 are written as pbem. Much of those games involves multi-turn actions. But I didnt say it wasnt possible. Just that its not something that the game has support for.

So you are recommending that each unit have a variable stored for a target-province (as in "I want to go to province 498") and then each turn refigure the next move to get it closer to province 498 (if its still possible that turn). And of course a message for any unit which becomes unable to complete its movement such as something taking out the connecting provinces it would have to move thru.

That would work of course. And if multi-turn tracking was instituted then there would be many many suggestions that we could get into the game. Turn recognition for map and mod commands for one thing, which would be fantastic for scenario creation.

Taqwus February 6th, 2007 08:21 PM

Re: Wish List: Routing
 
You might also store the number of turns required based on the previous province ownership values to reach the destination. If based on a new turn's ownership values there does -not- exist a path through friendly (or flyable) provinces that takes one or more fewer turns then that estimate, then one of the following must be true:

* The army has slowed down; possible if the player has assigned slower troops to it, or if it was flying and a global storm is in effect, or so forth.

* Previously efficient paths are no longer passable; perhaps the previous route included a province which is now hostile and the army can't fly, or an underwater province and Thetis just got dispelled.

In either of these cases, warning and canceling might be reasonable.

Actually, we already know that the movement order could store an associated destination in the turn file because it already does in the event that the movement takes just one turn. The only differences, if we ignore the above suggestion about times, are that the destination be interpreted as take the fastest route to this province even if we can't reach it in one turn instead of move to this province; and that the movement order be preserved for the next turn if not preserved. *shrug*

Gandalf Parker February 6th, 2007 09:11 PM

Re: Wish List: Routing
 
Quote:

Taqwus said:
Actually, we already know that the movement order could store an associated destination in the turn file because it already does in the event that the movement takes just one turn. The only differences, if we ignore the above suggestion about times, are that the destination be interpreted as take the fastest route to this province even if we can't reach it in one turn instead of move to this province; and that the movement order be preserved for the next turn if not preserved. *shrug*

That makes sense. At the moment it does things in a pbem way. I put my "I want to" into a .2h file (to host file) which is then absorbed, processed, and the results are kicked out to a .trn file (turn file). Any changes to the map are written to the fthrlnd file (fatherland) on the host server. Alot of that is invisible to any that isnt running a server but it defines the pbem starting basis of the game.

So far we have gotten some nice benefits from the game being changed to save an order that it got in the .2h file and send it back as a pre-set order of the same unit or province in the .trn file (monthly casting, queues, etc). I suppose the "where I move next" might be restored to the same unit as the default "where I move next" if the game is set to refigure the path each time. It might even turn off the "if move is possible" check which would allow me to say "move to 495" even if no route is available when I give the command. The army would continually try to go there until eventually it becomes available.

Id LOVE to see real multi-turn memory be written into the game. Many of my dreams are involved with the game being able to store a command for the future. http://forum.shrapnelgames.com/images/smilies/happy.gif At the moment the maps and mods commands are all "set it up at the beginning of the game" stuff. It would be a blast if we could get turn recognition or time-passed recognition into some of the commands. Such as "on turn 30" or "after 10 turns".

Graeme Dice February 7th, 2007 03:25 AM

Re: Wish List: Routing
 
Quote:

Gandalf Parker said:
I dont think civ 3 and 4 are written as pbem.

Which is relevant, why, exactly? There is absolutely no fundamental difference in how you would store a unit's destination just because you happen to transmit orders via a file rather than directly into the hosting computer. Every unit in Dominions already stores which province it is attempting to move to next turn out of necessity, which is all that's needed for a pathfinding algorithm to send the unit on a long term trip.

PaoloZ February 7th, 2007 09:30 AM

Re: Wish List: Routing
 
I agree with Graeme. It is not a hard task. A* should solve the problem quickly as the adjacency graph of the map is quite simple. The destination of an army is already stored, so it has to be changed the way the value is used and kept between turns (at the moment it is wasted every turn).

How the AI plans an attack?
I mean: if the AI has to attack your lands with an army assembled at their home province (assuming a distance greater than 1 between their home land and your lands), doesn't it plan a course?
Is this not pathfinding (maybe it's a greedy algorithm)?

The AI does not seem to push its armies around in a random pattern.

Gandalf Parker February 7th, 2007 11:49 AM

Re: Wish List: Routing
 
I agree. It seems easily possible within the frame that the game already does.

kasnavada February 7th, 2007 11:50 AM

Re: Wish List: Routing
 
I thought about this idea when I though of playing on a 400 / 2000 map... and thought about "real life" supply lanes, something completely missing from dominions, which I've found myself reproducing with commanders moving back and forth to reinforce my main(s) armies and commanders with a bag of vine just to bring supplies.

What I would like to see, to reduce micromanagement is another set of new instructions for commanders, based on real life supply lanes.

Gather army : order a commander to gather friendly troops from neighbouring lands.

Transfer army : order a commander to move a number of units from where he is to a point B.

Transfer supplies : same as above, but transfers supplies to an army, so they won't starve.

Transfer item : same as above.

What I can see with this idea, is your capitol-only unit and other units moving automatically, turn after turn, toward your frontiers, to join armies. I see failed assaults, armies routing and regrouping. I see real supply lanes from places to place that could be raided with scouts, stealthy of flying troops. And much less micromanagement.

What I think would be best is that you could choose what units to move (cavalry, infantry, archers). The best way I found to do that would be to implement a "transferable" category in the army screen (that would work just like the garnisonned category does now), and making a little change to the army creation screens that let you create units in the "transferable" or the "garnison" category.

The maximum number of units transfered would be dependant on 3 main factors : movement point of the commander, movement of troops, terrain, leadership... I've no idea what would make it balanced, my guess would be :
Units moved = (leadership / 4) * (movement / (distance of transfer)* terrain cost)

I feel that the maximum range for this action should be 3 or 4.

I would add a special case for astral magic, they should be allowed to transfer 1 man size unit / astral level to wherever they like (since teleportation is an astral spell, it would be logical on a RP sense), but maybe that feature should require research to be effective, for balance reasons.

Finally, scouts should, to balance that idea, have a small chance to find supply lanes, and some units should have the opportunity to raid them, in order to make the game more strategic.

I think this idea solves the problem of pathfinding for players, while offering another dimension to army-management in the game. I'm waiting for your replies should anything be explained or if you find a better way to use this idea, or even if you find it's a bad one.

merlinme February 9th, 2007 01:39 PM

Re: Wish List: Routing
 
As examples of how not to do it, though, both Rome: Total War and Heroes of Might and Magic used to drive me slightly nuts the way they would recalculate the route without telling you, if they bumped into an enemy unit. Sometimes you want them to do something else; sometimes you want them to attack. What you almost never want to happen is for them to spend five turns moving on difficult terrain around the blocking army. Yes you can stop them if you realise, but I've quite often got them to continue movement without thinking about it, and wasted a turn or two. Or, to take another example, in Hearts of Iron 2, if a province changes hands, you'll actually end up attacking unexpectedly, and that's almost never what you want.

There is an equivalent problem in Dominions 3 when a province changes hands, which is why I raised it.

Psientist February 9th, 2007 02:32 PM

Re: Wish List: Routing
 
All good points! I'm glad it sounds feasible, at least for the future.

I suppose this might be related because of the "stored future commands" thread that Gandalf brought up; but it would also be nice to buffer commander recruitment (more than one), and assign the "target province" in the buffer. It's probably too much to ask for to buffer commander AND unit recruitment, auto-assign units to commanders, and then set target provinces... it certainly would be nice though, as on a large map one could set up relatively remote fortresses to be "army factories" that send units to a nexus fortress in your domain that's near the battlefronts, that require little attention except to resources and funds. One can't escape micromanagement entirely, but every little bit helps.


For what it's worth, Civ: Call To Power *was* PBEM, because that's why I bought it. The relevance, I guess, is that to the devs it shows that various problems under discussion have been conquered before in analagous games.

Gandalf Parker February 9th, 2007 02:48 PM

Re: Wish List: Routing
 
At this point in the games development (and I dont foresee a change) anything requiring a buffer could be a problem. The "buffer" would have to be written out to your file and then read back in each time the game processed a turn. People have wanted buffers for multiple turn planning on evreything from commander actions, to province actions, to research, to well.. just about everything in the game. We could end up with each turn maintaining an entire games actions in multiple snapshots running over 10 turns. And thats not even taking into the account the people who have requested history info such as previous moves, previous messages, etc. So it could be an entire games snapshop 10 prior and 10 ahead.

I think that was requested here has been worked out so that it could work with the games present way of tracking things. At least as far as we can understand the code of it. But that method doesnt quite stretch to real multi-turn tracking.


All times are GMT -4. The time now is 05:25 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.