Cpl Steiner Posted September 4, 2007 Share Posted September 4, 2007 I am playing a scenario in WEGO mode (v1.03) at the moment and have just received a pair of tanks lined up on a road. I ordered the tanks to move down the road. The lead tank moved down the road without any problems at all. However, the following tank made a mad detour. I think I now understand what is causing this mad behaviour. The AI mustn't be anticipating where a vehicle will be in the future for a sufficiently short time-frame. If a pair of vehicles is ordered to move, the AI plots the movements for following vehicles as if the lead one was static. This is quite apparent from my screenshots below. N.B. - Notice that I ordered a humvee to back off the road to allow the lead tank room to pass. The lead tank successfully stayed on the road so the game must anticipate future vehicle positions to some degree - just not quickly enough for close together vehicles. 0 Quote Link to comment Share on other sites More sharing options...
TheVulture Posted September 4, 2007 Share Posted September 4, 2007 Nice job of showing up a problem clearly. They more or less have to do that though - base your route finding on the current map. An AI that attempts to plan its route based on what routes will be available at the time it is driving down them would be an nightmare. One simple fix that might improve things would be to distinguish between permanent and temporary blocks (temporary being a vehicle that is still able to move). When faced with a temporary block, allow say 10 or 20 seconds for it to move, and if it hasn't go around. But actually that wouldn't work that well either - it seems to me that the only reasonable approach would be to drive to where the temporary blockage is and wait there (or not, if it has already moved), but I'm pretty sure that could generate some pathalogical behaviours too (of the 'failing to anticipate the obvious' variety). No idea how well that would work in practice. It ought to work well in this particular case, but you never know what unanticipated side-effects will crop up. Was the following tank given a pause command? And would that make any difference? If the path is calculated on the fly as the vehicle starts to move, the a long enough pause to allow the front vehicle to reach open space (wide enough for the following tank to get around) ought to produce 'expected' behaviour (wouldn't help with trying to get a convoy of vehicles down a narrow road though - they'd be all over the shop). If the path is calculated in advance (and only altered due to changing situations blocking the pre-chosen path) then the pause might not help at all. 0 Quote Link to comment Share on other sites More sharing options...
Martin Krejcirik Posted September 4, 2007 Share Posted September 4, 2007 The TacAI should trust the player and ignore friendly units. If it happens to bump into another unit it shoud wait say 30 seconds for the player to resolve the situation and only after that it should attempt to drive around. 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted September 4, 2007 Author Share Posted September 4, 2007 Originally posted by TheVulture: They more or less have to do that though - base your route finding on the current map. An AI that attempts to plan its route based on what routes will be available at the time it is driving down them would be an nightmare.Except the lead tank manages to recognize that the Humvee further up the road is reversing off it and therefore does not make a detour. Clearly the AI can re-plot waypoints mid-turn to some degree already. Was the following tank given a pause command? And would that make any difference? If the path is calculated on the fly as the vehicle starts to move, the a long enough pause to allow the front vehicle to reach open space (wide enough for the following tank to get around) ought to produce 'expected' behaviourI didn't give the following tank a pause command. In CMx1 this was necessary only if the following vehicle had a higher command delay than the one in front. In CMx2, I've never seen any command delay in operation, even in WEGO mode (which in itself seems a step backwards). I would tend to agree with Martin Krejcirik, i.e. the AI should ignore friendly units when plotting moves and just rely on collision detection (which is itself not well executed in CMx2 compared to CMx1) to stop a following vehicle long enough for a vehicle in front to move out of the way. 0 Quote Link to comment Share on other sites More sharing options...
TheVulture Posted September 4, 2007 Share Posted September 4, 2007 Originally posted by Cpl Steiner: Except the lead tank manages to recognize that the Humvee further up the road is reversing off it and therefore does not make a detour. Clearly the AI can re-plot waypoints mid-turn to some degree already. There are two differences there. A) It looks like there is enough room to get around the humvee on the road, and whatever detour it plans to get around the humvee, it can follow the road for some time, whereas the following tank starts off pretry much at the point where it has to take its detour. When the takns get to their respective 'detour' points, one has a clear road and the other a blocked one. So it's not necessarily anything to do with anticipation. I didn't give the following tank a pause command. In CMx1 this was necessary only if the following vehicle had a higher command delay than the one in front. In CMx2, I've never seen any command delay in operation, even in WEGO mode (which in itself seems a step backwards). I would tend to agree with Martin Krejcirik, i.e. the AI should ignore friendly units when plotting moves and just rely on collision detection (which is itself not well executed in CMx2 compared to CMx1) to stop a following vehicle long enough for a vehicle in front to move out of the way. Yeah - when it comes to AI progamming issues I tend to look for the problems with an idea straight away, which leads me to see problems that might not be there. The CMx1 system worked pretty well: ignore friendly vehicles as blockages until you run into them. Well, pretty well aside from it's ability to simulate traffic jams when trying to move a column... So maybe try 'ignore friendly vehicles until you hit them (more or less), then wait time T (say 10 secs) to give them a chance to move before planning another route'. It will probably cause some odd behaviour, but will be more directly under the player's control, whilst being slightly more tolerant than CMx1. (Odd behaviour, like Cmx1 traffic jams, are much less of a problem if the behaviour is reliably predictable, because at least the player can know what effects his commands will have and use them accordingly). Might have some issues with losing vehicles to enemy action starting the 'death clock' ticking, while the following vehicle sits there (in the firing line) waiting to see if the dead vehicle is going to move. But hopefully the threat avoidance AI ought to kick in at that point and override the commands anyway. 0 Quote Link to comment Share on other sites More sharing options...
Dirtweasle Posted September 4, 2007 Share Posted September 4, 2007 Yep, that lines up nicely with what I've seen too. I thought at first 1.03 nailed the path finding problems cold but as you have shown and I found as well it's still not without problems. Improved, yes but not nearly fixed completely. 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted September 4, 2007 Author Share Posted September 4, 2007 Interestingly I played the scenario again in RT and this time the following unit did not make the detour. Make of that what you will because I'm flummoxed! 0 Quote Link to comment Share on other sites More sharing options...
Huntarr Posted September 4, 2007 Share Posted September 4, 2007 I have seen this also. The solution is to set the following vehicles 1st waypoint to a spot right behind the lead vehicle's starting position. Then you may layout subsequent waypoints. 0 Quote Link to comment Share on other sites More sharing options...
Hawkmek Posted September 4, 2007 Share Posted September 4, 2007 Why do you have a Humvee so far South when the tanks came online? All my guys were halfway to Gun when the heavy armor showed up. This scenario is great but killed my old rig. Seriously, I had the same issues at the beginning of this scenario trying to get all the vehicles positioned safely because I did not know what was downrange. Pathing needs tweaking and I am sure it will be taken care of in the near future. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.