Jump to content

Hug a wall!


stoex

Recommended Posts

Lays and Gemmen,

Something that was not really obvious to me for a long time since I started playing CMSF has recently become one of the prime causes of death among my pixeltruppen and probably the most common origin for my 'ya gotta be kiddin' me!' moments. I think it has to do with my playing more MOUT battles of late, as well as the overall very pleasing state of the game at v1.21, that this issue has only really become noticeable to me now. It's one of the very few issues left...;)

It's this:

Quite often, infantry ordered to enter buildings take somewhat adventurous routes over the last few feet of open ground before entering said building. While the AI is very good about staying in cover between buildings and using terrain for concealment, frequently I see my men bounding away from the house they are supposed to be entering anywhere between 3 and 15 feet from the door, single-filing into the middle of the adjoining action spot (unfortunately often a paved road, for good measure), before making a sharp turn and running into the building. Or at least trying to, as this behaviour often exposes them to nearby enemy units which invariably unleash large quantities of 'speed metal' on them :(. The point is that these enemies (I usually know they are there or at least thereabouts) would not have been able to see my men if they had just stayed close to the wall of the building they were entering.

I don't quite understand, from a realism as well as a programming point of view, why it is necessary for every man in a squad to take a 15ft. running start to clear a doorway. It appears to be more or less regardless of which type of move command my men are given, though it does seem to happen more on 'quick' than on 'move'. The same also applies similarly to men exiting buildings, though not as frequently, it would seem.

Any thoughts on this? Any possibility of this issue being addressed by BFC? Workarounds of some kind? Commiseration :)? Any input is appreciated. I will try to produce a screenshot to illustrate this, unfortunately I'm an expert at forgetting to start FRAPS before starting CMSF, and play in RT.

Cheers!

Link to comment
Share on other sites

I have seen, and cringed, at this same thing. I think it probably has to do with action spots for infantry. I am guessing but maybe they have to "tag" the spot in order to leave the action spot. Maybe a sort of common element for all the different terrain types?

I would love to see a stacked wall hug as well. While we are at it, how about a wall-hug/breach/bang/clear in one simple command?

Link to comment
Share on other sites

I would love to see a stacked wall hug as well. While we are at it, how about a wall-hug/breach/bang/clear in one simple command?

Idk about breach, BANG, clear... but a breach and frag should be easy enough. Hugging the wall should be standard for any move into a building, but if you were to say issue an "assault" order, it seems like it would be possible to have them throw a frag or two in first to prep the building. Probably err on the side of more frags as it's just one big room.

Link to comment
Share on other sites

I cringed at this also. Sometimes getting the men to form up at the door or the wall of the building and hunting or quick running them in will prevent them from going out past 5 feet or so.A couple troops will venture out but the majority will go directly into the house.Also when issued the hunt command to go around corners when they are stacked against a wall, they seem to stick to the walls fairly well.One or two soldiers will venture out from time to time also, but its iffy to judge for that situation because sometimes its a good thing and a soldier spots something and sometimes its a bad thing and a soldier gets picked off.

On a tactical level to avoid this, try to make sure any enemy LOS on the door is neutralized or non existent.Use Smoke and suppression fire.It would be cool if the troops did form up on the building and move in hugging the wall though.

Link to comment
Share on other sites

I am really impressed with how your soldiers will toss grenades into the building before entering.

When I am moving into a suspected enemy occupied building, I usually try the following.

1. I suppress the building with MG and rifle fire with squad A. Heavy weapons welcome! :)

2. After 40 - 60 seconds of suppression, I will give Squad B a TARGET LIGHT order on the building and a QUICK order to an action spot hugging the building, nearest my entry point (door) of choice. My next action spot is a hunt into the building itself.

The TARGET LIGHT order makes the men shoot and throw grenades into the building, even while running and hunting.

NOTE: Cancel the target light order soon after entering the building.

Link to comment
Share on other sites

1. FACE orders at action spots effect the orientation against walls and corners within action spots even though there is no UI feedback to tell you this.

2. Every square that has a waypoint order on it will have your guys "regroup" on this spot. It is sometimes best to not put the waypoint right outside the door, and then into the building, instead try to place one waypoint inside the building and one in the closest "full cover" square. They should move directly from one to the other and not stop for a ciggie outside the building.

This solution isn't perfect because sometimes it creates other pathfinding weirdness, but is a trick if you don't want your men haltinging in a a dangerous spot.

I made a little training town map with buildings and walls aligned across the tiles in different ways and ran my dudes around to test what works.

Link to comment
Share on other sites

You can target the building from any waypoint that is in LOS to the building, they will start to throw grenades when they are in range AFAIK.

I know it is not perfect in every situation, the range of building placemants and orientations on the action spot grid makes some doorways easier than others. Being aware of the action spot tiles and their LOS to the enemy when you are placing orders makes a difference. Avoid ones that hang out in the street if you can.

Link to comment
Share on other sites

I have NEVER seen anyone throw a grenade into a house from anywhere but the action spot adjacent to the house itself. I believe I tested this in the past but I will mess around with it again today. I think it is to simulate the small hole of a window. You have to be right up against it in order to get a nade in there.

Link to comment
Share on other sites

Thanks for all the replies and the good discussion, people! More thoughts from me, and an illustration for Thomm:

I generally don't let my men stop at an action spot adjacent to the building, as I find this creates all the more trouble, often causing them to take up positions even further from the entrance and therefore more exposed. Also, when infantry reach a waypoint and have a pause or no further movement orders following, they tend to 'mill about' a bit before settling down, which is definitely not something I want them to do in the given situation...I do of course area fire buildings before going in if I know or expect there to be enemies inside, preferably with something heavy. This is another reason why I send my men directly into the building, however, since timing is of the utmost importance so as to a) not expose my men to my own area fire, while B) getting them inside ASAP after the end of said area fire, while the enemies are still suppressed. Pausing them outside the building makes this difficult. Plus they don't use as many 'nades this way...

Thomm - you asked, I answer here: I had particular trouble with this phenomenon recently in the first mission of the Red vs. Red "Road to Dinas" campaign (by Paper Tiger, I believe, great stuff and very challenging). The mission is called "Petani - Shock and Awe" and it features a small town with a long, straight, paved road running alongside it on the very edge of the map. This means I can't get good overwatch on the buildings along the road. Here is what happens:

hugawall1.jpg

My HQ squad in their starting position on the road. I order them to 'quick' into the next building. Though I can't see them, from previous incoming fire I am quite certain there are enemies in the tall building on the right of the screen, as well as in buildings further to the right, overlooking the road. Still, it should be no problem (in real life) to get into the next building without being seen or at least without exposing oneself all too much, right? That's what hugging walls is for...weeeell...

hugawall2.jpg

The squad heads out. As they approach the building, they veer off and start moving into the middle of the road. The closer they get to the door, the further away from it they move laterally. But they're still ok and haven't been seen...maybe...

hugawall3.jpg

This is the squad in single-file suicide mode now...every single one of them steps beyond the middle line of the road in turn before jogging through the door. I can hear gunfire now, but can't see anything yet.

hugawall4.jpg

They've almost made it, but the air is thick with bullets now. There appear to be enemy squads in both of the tall buildings on the right side of the screen judging by the bullet paths...another thing that doesn't help with all this is that since men in squads tend to move in the order they are listed in the GUI, the guy with the RPG is last in line and therefore most likely to bite the dust! Amazingly, in this test run, the entire squad makes it into the building without suffering casualties. This did NOT happen while I was actually playing the scenario. *sigh*

hugawall5.jpg

This is my favorite shot, from a second test where I substituted the 'quick' order with a 'move' order. As soon as the bullets start flying, the squad automatically switches to 'quick', of course (and, unbelievably, they all make it unscathed AGAIN), but their pathing is identical to the first test. Check out the position of the last soldier...he's actually run a good 6 feet beyond the door of the building, just to give the enemies a better chance of hitting him! *BIG sigh*

So there it is. I think it's a wee bit silly. BTW, in another test (without screenshots this time), I started the squad off from the recess between the two buildings (you can see it in the first two shots) just to see what would happen. The outcome was the same.

Comments?

Link to comment
Share on other sites

Guess so, Lanzfeld...as you say it's not a gamebreaker, and in most cases it can be avoided by careful planning and tactics, but on the odd occasion where there is no other way to get into a building you need to get into, it turns into one of the rare save-before-and-maybe-reload-few-times moments for me. I do this when I have the feeling that limitations in the game engine cause an unrealistic disadvantage for me. And no, I don't reload when this happens to the AI. Tough buns to them! :D

Link to comment
Share on other sites

The problem does appear to be one of plotting a series of action points for each team that will be passed in turn to get to the destination. The path taken by a squad is then to the center of each waypoint in turn, with some 'avoiding collisions with your mates' effects.

Aside from the wall hugging (or not) problem, this shows up in the choice of routes for larger scale moves sometimes. I just had this issue in "It ain't half hot Mum" (Brit module mission) where I wanted to reposition units with the dry riverbed. Most of the riverbed is exposed to Syrian MG fire, but close to one edge men are safe in the shelter of the slope of the river bank. My first attempt to move within the river bed was a move at about 30 degrees to the grid lines. The problem is that the pathfinding does tend to make infantry move either along grid lines or at 45 degrees to them, with the result that my men wandered out into the open and took fire before angling back in to the bank again:

anglemove.jpg

Green lines are the river bed banks. Light blue line is the plotted move order. Red line is the actual route taken.

Obviously I learned from this and plotted subsequent similar moves with more moves at 0/45 degrees to keep them safe, albeit with more delays due to the regrouping at waypoints.

IIRC vehicles used to behave like this a long time back, but were fixed to move in straight lines to their waypoints as often as possible. Presumably with a single infantry move potentially consisting of multiple men in mutliple teams there are more difficulties with making infantry pathfinding and making men behave in a similar way. If it could be fixed it would solve the wall problem too; the pathfinding would (ideally) plot a straight line to the door and then to the middle of the room, rather that through the series of action spot centers along the way.

But as anyone who has had to deal with it knows, programming pathfinding is a bitch, and doing it for squads consisting of up to 13 men in up to 13 teams, whilst having also to do it for each team individually (and track the location of each man individually) is even more so. And even more so again when dealing with continuous positions rather than gridded positions and terrain that is more complex than a simple grid.

Link to comment
Share on other sites

Thanks, TheVulture! Your post has given me an inspiration about my original problem. Well, at least a way to judge ahead of time which movement orders into buildings are likely (maybe certain) to result in the mentioned behaviour, and which aren't. It's all about the action spots, of course!

Soldiers obviously have to 'tag' the action spot closest to the door before going in. When the door through which an infantry unit will enter a building is in a wall which stands on the edge of an action spot in the underlying grid, then the closest action spot is 'one action spot away from' the building. Therefore, the soldiers have to run out to the middle of that action spot, which is 4 meters away from the door. Single-file suicide mode...

When the wall with the door stands in the middle of an action spot (crossing it horizontally or diagonally), the soldiers are able to use the half action spot visible outside the building as their final 'tag' spot before entering, thereby staying much closer to the building wall.

Presto! At least now I know which doors are the 'bad' ones! Still can't always avoid them, but it's good to have 'situational awareness' regarding this, anyway...

Link to comment
Share on other sites

Good thread here.

Map design also plays a role. Units tend to move through the center of each action spot "square". So if you have a road tile or "full square width" road as shown in the screenie, your guys will move (dangerously) down the center. But if either (or both) edges of the road are "half squares" abutting walls or buildings, moving down the center of those squares will naturally hug the wall as troops would in RL. (I'd post a diagram for greater clarity, but too busy - sorry).

Link to comment
Share on other sites

The problem does appear to be one of plotting a series of action points for each team that will be passed in turn to get to the destination. The path taken by a squad is then to the center of each waypoint in turn, with some 'avoiding collisions with your mates' effects.

Aside from the wall hugging (or not) problem, this shows up in the choice of routes for larger scale moves sometimes. I just had this issue in "It ain't half hot Mum" (Brit module mission) where I wanted to reposition units with the dry riverbed. Most of the riverbed is exposed to Syrian MG fire, but close to one edge men are safe in the shelter of the slope of the river bank. My first attempt to move within the river bed was a move at about 30 degrees to the grid lines. The problem is that the pathfinding does tend to make infantry move either along grid lines or at 45 degrees to them, with the result that my men wandered out into the open and took fire before angling back in to the bank again:

Green lines are the river bed banks. Light blue line is the plotted move order. Red line is the actual route taken.

Obviously I learned from this and plotted subsequent similar moves with more moves at 0/45 degrees to keep them safe, albeit with more delays due to the regrouping at waypoints.

IIRC vehicles used to behave like this a long time back, but were fixed to move in straight lines to their waypoints as often as possible. Presumably with a single infantry move potentially consisting of multiple men in mutliple teams there are more difficulties with making infantry pathfinding and making men behave in a similar way. If it could be fixed it would solve the wall problem too; the pathfinding would (ideally) plot a straight line to the door and then to the middle of the room, rather that through the series of action spot centers along the way.

But as anyone who has had to deal with it knows, programming pathfinding is a bitch, and doing it for squads consisting of up to 13 men in up to 13 teams, whilst having also to do it for each team individually (and track the location of each man individually) is even more so. And even more so again when dealing with continuous positions rather than gridded positions and terrain that is more complex than a simple grid.

Yes you have it exactly right. The direct vehicle type pathing only works over open terrain too, so it is not eactly the same.

Hopefully this can be improved.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...