Jump to content

Grenade Miss Scatter Discussion Thread


Chris

Recommended Posts

A few forum users have been asking us to improve the way grenades work for a while now, and I think we've finally reached the point where we can devote some time and energy to figuring out how they can be made to feel more realistic. The key issue is that a "miss" grenade will often act in an unpredictable manner that just doesn't make sense within the context of the game.

Let's start by discussing the things a realistic grenade model should ideally model:

  • Throw Arc: grenades don't travel in a straight line like bullets do, they travel in an arc. This is really hard to model in our game because objects just have a % block chance and the game doesn't know their shape; a waist high crate might have the same 40% block chance as a window that is visually much taller.
  • Range: a hand-thrown grenade has a much more limited range than a normal weapon. It makes sense that accuracy would decrease with range, but if a soldier is attempting to throw a grenade as far as possible then it also doesn't make sense that a "miss" can scatter further than max range.
  • Scatter Distance: the potential scatter distance from the target from a missed throw should increase with range, and it should be far enough that grenades are not guaranteed to inflict damage even at long range due to their blast radius being bigger than their scatter radius.
  • Intervening Objects: if the scatter represents the path a missed grenade travels down, the grenade still needs to be able to hit intervening objects otherwise it would be possible for the grenade to scatter straight through the walls of a building etc. We therefore need to check for collisions with objects down the new path of the grenade and stop the grenade earlier if necessary.

If there's other things that we should discuss, throw them up in the comments below. How the current X2 system works is that it determines a scatter distance from the target based on range (this scatter is quite small actually, only 2 tiles max at long range) and then it traces the shot path and checks every intervening object to see if the grenade impacts it. I believe adjacent cover is disregarded as normal, but if you have a doorway 2 tiles away with a 20% block chance then on a miss there's a 20% chance the grenade just smacks into that and stops.

A few thoughts:

  • The throw range of a grenade should be based on the Strength of a soldier; maybe 4 tiles + 1 tile per 10 points of Strength or something to that effect
  • The accuracy of the grenade could be based on the throw range; perhaps any throw at max range has a 10% hit chance and this goes up by 10% each tile closer the target is. High Strength soldiers can therefore throw grenades at short range at perfect accuracy, whereas weak soldiers cannot.
  • The number of tiles the grenade scatters could be determined by how much the hit attempt misses by. This naturally means high-accuracy throws won't miss by much, because you can only miss a 80% Accuracy shot by a maximum of 20%. But throwing a grenade at long range means you can potentially miss by much more, so there's a much higher chance of the grenade going somewhere unexpected as a result of a bad roll.
  • Modelling the arc of the grenade is tough; the arc of a long throw is very different from an underarm toss over a high wall close to you.
    • It's important to allow people to throw over "free walls" like the hedges and concrete walls you see in farm maps.
    • However, its also important not to require the grenade to travel into the level above as then you wouldn't be able to throw them indoors or in underground maps like alien bases.
    • Some kind of path tracing is also required to check for roofs or ground tiles, otherwise it'd be possible to throw a grenade inside a building / UFO from the outside.
  • I think maybe the solution is to check along the projectile path whether it is possible to trace a path to the target through the tiles in the level above, and if so then you can disregard all intervening objects from the hit calculation (and when you are tracing the projectile path on a "miss" shot). If not, then you have to travel through those tiles and potentially hit all the intervening cover with your throw. This would make throwing grenades indoors quite a bit harder than using them outdoors, which I feel makes sense.
    • I guess the standard shooting rules should apply when calculating a shot hit %; adjacent cover is disregarded and only the highest blocking object is used in the calculation.

If anyone else has any thoughts or suggestions, let me know. I think I'll mull this over for a bit and then try to figure out a sensible formula that could give us what we want.

The HEVY is currently a grenade launcher; I think I might make it a piece of advanced techology that's conceptually more like a lightweight multi-shot rocket launcher - essentially just changing it into a standard direct fire weapon, but keeping all the other stats the same. One of the main reasons we used a rocket launcher in X1 rather than a grenade launcher was that direct fire weapons work much better within the confines of our game.

Link to comment
Share on other sites

Would it be possible to set up two fire modes for a grenade, one for a parabolic arc and one for a perpendicular line? That way you push off the inital decision on how a grenade travels from the code to the player. Naturally there's the issue where a player picks the wrong kind of path and gets mad about it but perhaps if the parabolic arc was displayed a-la XCOM and PP then it might be clear. 

Link to comment
Share on other sites

Definite yes to HEVY being a micro missile launcher, saves you a lot of messing about, as grenade launchers are by nature quite accurate and may unbalance the game as is. Grenades “should” be able to be thrown in a parabolic arc, as well as being bowled under arm in a straight throw. A trooper by a doorway should be able to throw it into a room quite far without it being disallowed by the arc hitting the ceiling. As for accuracy, further the throw, if failed more deviance, the nearer the throw more accuracy, and if failed near miss of the intended target but tough still gets splash damage........grenades do have quite a large area of effect.

  • Like 1
Link to comment
Share on other sites

I think the biggest issue is going to be objects in the grenade's path and blocking chance. It's hard to handle. The idea of checking for a path on the level above is good, but it's only an approximation. If you only use that, you'll end up with impossible paths, so at most such a check can be used for part of the implementation.

Consider throwing a grenade over a wide, one level tall barn while standing next to it. The soldier is at X, the rectangle is a barn. 

 +----------------------------+
 |                            |
 |                            |
 |                            | Target
X+----------------------------+

That means there's a path through the level above:

+----------------------------------------------------+
|                                                    |
|      ^--------------------------------+            |
|      |                                |            |
+----------------------------------------------------+
|      |-----------------------------+  |            |
|      ||                            |  |            |
|      ||                            |  v            |
|      ++                            | Target        |
|      X+----------------------------+               |
+----------------------------------------------------+

But the path is impossible for a grenade throw - a grenade can't make two turns at a straight or nearly-straight angle. The soldier would need to stand some distance away from the barn in order to have the possibility of making that throw. Instead, I think the blocking chance of items on the ground level should be (nearly) unchanged near the thrower and the target, and be (nearly) zero in the middle of the path. This is a way of accounting for the grenade's parabolic trajectory, where it would in reality be at its highest point when halfway to the target.

Alternatively, you could try and calculate proper parabolic trajectories, but that's easier said than done.

Link to comment
Share on other sites

I had a look at other contemporary games and saw how they dealt with grenades. XCOM 2 like its predcessor deals with grenades and indirect fire weapons by perfectly calulating an arc. Whatever the end tile of the arc is, the grenade is desposited there. There are no mid-air collisions - if the arc can't be traced through to a flat tile, then you can't throw it. I suspect the developers for XCOM and XCOM 2 found it easier to do this and artifically restrict the number of grenades a squaddie can have than try and model it more authentically. 

PP models grenades more authentically. Grenades and indirect fire weapons always scatter.  The degree to which they scatter is dependant on the distance they travel, and a true parabolic arc is modelled after the final landing point is determined. You can have mid-air collisions - a grenade or an indirect fire weapon can be stopped by an intervening piece of terrain that is NOT a flat tile. However, grenades and indirect fire weapons are always modelled as perfect arcs, which is frustrating in certain situations, especially inside a building. 

OpenXcom was a facinating read. Looking at this thread: https://openxcom.org/forum/index.php/topic,1532.0.html  it would seem the OpenXcom prefers an eliptic arc rather than a parabolic curve. And in fact in this thread: https://openxcom.org/forum/index.php/topic,4726.0.html states baldly that the arc is formed from a series of points and a straight line is drawn between each those points, so not a true arc at all. 

For all these games, grenades and othe arcing weapons ignore the usual rules for shooting in that game. It seems necessary to work out an arc and see if that arc collides with props. 

 

EDIT: Having thought about Solver's comments, it occurs to me that players are more likely to want something even with cases such as Solver's scenario, that to have nothing at all because of said cases. People have an infinite capacity to explain away implausible situations or make amusing youtube videos out of it.

Link to comment
Share on other sites

On 2/14/2020 at 4:51 PM, stewpidbear said:

Definite yes to HEVY being a micro missile launcher, saves you a lot of messing about, as grenade launchers are by nature quite accurate and may unbalance the game as is. Grenades “should” be able to be thrown in a parabolic arc, as well as being bowled under arm in a straight throw. A trooper by a doorway should be able to throw it into a room quite far without it being disallowed by the arc hitting the ceiling. As for accuracy, further the throw, if failed more deviance, the nearer the throw more accuracy, and if failed near miss of the intended target but tough still gets splash damage........grenades do have quite a large area of effect.

I agree with ALL of this.  Perhaps there could be two options for grenade throwing - overarm (distance shot) or toss (ie short distance where you intend to run away to cover, ie into a room or UFO).  Also, I concur with the HEVY being a missle launcher. 

Link to comment
Share on other sites

Thinking more about this, perhaps make the HEVY launcher non reloadable in the field and limit it to two per squad? In “real” life a squad would be highly unlikely to have more than two heavy weapons, perfect SciFi example is Aliens where the Marines have two smart guns, not more. Another research branch could be individual LAW rockets which were definitely around in the 80’s.

Link to comment
Share on other sites

19 minutes ago, stewpidbear said:

Thinking more about this, perhaps make the HEVY launcher non reloadable in the field and limit it to two per squad? In “real” life a squad would be highly unlikely to have more than two heavy weapons, perfect SciFi example is Aliens where the Marines have two smart guns, not more. Another research branch could be individual LAW rockets which were definitely around in the 80’s.

If you want to impose a limit to the number of HEVY's carried, a more natural (and henceforth less objectionable) way of doing it would be to make the HEVY manufacturable, imposing a steep initial cost in terms of time and money to deploy, and make its ammunition manufacturable, imposing an on-going cost that eats into manufacturing other items. 

Link to comment
Share on other sites

Whatever the final rules decided upon, I think players should be able to make a reasonable choice about using weapons based on the evidence they already have about unusual results.  If I can't see an obstacle on a map, then my grenade shouldn't bounce off an invisible obstacle.  If I fire a grenade or missile launcher, it shouldn't go 5 inches and then fall at my feet- (as just happened to my squaddies)-unless I have some way of knowing that it may do so (like putting in the manual: "grenades and missiles may occasionally misfire and blow up the operator and adjacent friendlies").

Also, if we're going to have "catastrophic misfires" where the missile/grenade blows up  in the same hex as the operator/thrower, that should be: the chance the weapon misfires time the chance that the misfired explosive blows up (ex.: .2 chance X .2 chance = .04 chance..I think).  Some number of dropped grenades will be duds or else be immediately picked up and thrown again; some number of missile misfires will only cause damage from the propellant burning down but won't explode.

Edited by maxm222
clarification
Link to comment
Share on other sites

4 hours ago, Max_Caine said:

If you want to impose a limit to the number of HEVY's carried, a more natural (and henceforth less objectionable) way of doing it would be to make the HEVY manufacturable, imposing a steep initial cost in terms of time and money to deploy, and make its ammunition manufacturable, imposing an on-going cost that eats into manufacturing other items. 

I honestly wasn’t trying to be objectionable in my suggestion, I was looking at the set  up as it would be in some reasonable ‘real’ life basis (I know it’s fiction but it’s the suspension of disbelief creeping in, to me that is;)).  I think I’m looking at it in my mind with real life vs game life if that makes sense.

 

Link to comment
Share on other sites

I'd advocate calculating a real parabolic arc instead of using a system that is hard to predict.

A ballistic trajectory mainly is dependent on the initial movement vector; that would be true for both thrown and launched grenades. You could handle the inaccuracy by altering the throw vector in its strength (length) and direction depending on distance and the thrower's accuracy. You could then project an "forecast" area onto the scene describing where the grenade may actually land, so it is always understandable what risk you are taking by attempting that throw. Finally, you apply the randomness to the vector and calculate the actual parabolic trajectory. The good thing with such a system is that it behaves as we would expect, along with the possibility of deflecting surfaces like ceilings, floors, walls (deduct some strength from the vector at the moment the surface is hit, mirror the direction according to the surface normal and calculate the next arc up to some threshold strength where the grenade is just considered stationary).

If not this, then I'd propose a system based on your cover system. Determine the highest obstacle in the way between source and target to see if the throw is actually possible, and if so, how many stories it would arc over (you could limit the height, but the maps are already limited in height and not too high to be totally unplausible). With every necessary height level, the accuracy would drop (maybe halve), reflecting that throwing over a building is not very accurate because since you cannot see and have to expend much strength to even reach the height, it is hard to hit even near the target. Then, for each height level bridged, you would separate a portion of the throw and assign to it the height of objects it can pass over without a chance of interference. This would start at full height obstacles on the thrower's level, as humans are not really capable of hitting cover right in front of them (well, I also had a comrade in the military who managed to hit his own sandbag cover, but... you know... elite troops and all...). Towards the end of the arc, even half height objects on the target level could interfere and stop the grenade short for a bit. Basically, you then have the whole distance separated into smaller ranges where certain height cover has the chance to interfere. I want to have an exception to the area very close to the thrower not just because it is rather unlikely for a throw landing at your feet to really happen, but also because it is really unsatisfying and confusing for the player. Personally, I would not use grenades in any situation where I would risk the thrower's life, so I'd abstain even from throws my experience tells me would be safe.

Link to comment
Share on other sites

4 hours ago, Dagar said:

Personally, I would not use grenades in any situation where I would risk the thrower's life, so I'd abstain even from throws my experience tells me would be safe.

While I do agree with you a real life example of danger close grenades was the Battle Of Hue in Vietnam where the Vietcong were getting so close that US Marines threw grenades close into the enemy and hunkered down and tried to absorb the fragments in the back of their flak jackets!

Link to comment
Share on other sites

On 2/17/2020 at 5:22 PM, stewpidbear said:

I honestly wasn’t trying to be objectionable in my suggestion, I was looking at the set  up as it would be in some reasonable ‘real’ life basis (I know it’s fiction but it’s the suspension of disbelief creeping in, to me that is;)).  I think I’m looking at it in my mind with real life vs game life if that makes sense.

 

Oops, I didn't mean harshly! It's just that if the number of rocket launchers were artifically limited then that would likely raise objections (why can't I give everyone a rocket launcher!)

Link to comment
Share on other sites

16 hours ago, stewpidbear said:

While I do agree with you a real life example of danger close grenades was the Battle Of Hue in Vietnam where the Vietcong were getting so close that US Marines threw grenades close into the enemy and hunkered down and tried to absorb the fragments in the back of their flak jackets!

Well, in that case they were intentionally throwing very short, risking their own lives. That should still be possible in Xenonauts 2. All I am saying is that it does not come across as believable if 10% of your far throws land short because of wonky mechanisms, and in that case I would not use damage grenades at all, most likely.

  • Like 1
Link to comment
Share on other sites

If I throw a grenade far away it should at least land somewhere near to where I threw it, even if it goes way off course.

The worse thing in any game that has a throwing mechanic is when your guy fumbles terrible and tosses the grenade at his feet somehow.

I can accept people being terrible throws under pressure (I'm sure someone will post a video of someone accidently tossing a grenade, live or otherwise, too close to themselves) but in theory our soldiers are some of the ""best"" soldiers on Earth and they should have a good enough throwing arm.

If I toss a grenade 8 tiles away, assuming my character has the strength to make that throw, the grenade should land somewhere near to that throw, even if it deviates three or so tiles to the side away from it, the only circumstance where a grenade should end up landing very close to the thrower is if the person throwing is doing so when there's some object in their way that could catch the grenade, a person, tank or object. 

  • Like 2
Link to comment
Share on other sites

Regarding throwing arcs

At the moment, all discussion has been centered around the assumption that an object when thrown in an arc can reach the landing zone unimpeded. This is possibly true when there is no variance in the landing zone, but what happens when there is variance? There is the possibility of mid-air collisions, where an object on a higher level which had not been previously accounted for in the initial throwing action can impede the movement of the thrown object once the variance of the landing zone has been calculated. PP handles parabolic arcs and scatter variance so there are lessons to be taken away from PP.

 

To begin with, PP gives you no clue as to how far the thrown object will scatter. You choose a point and cross your fingers. You also have no idea if a thrown object will intersect an another object. If it does, the thrown object either explodes if it can, or interacts badly with the object it collided with. It's common in PP for the worms which Chirons launch to end up underneath or inside props, because the engine can't handle it. I think if a proper arc was to be drawn between target and launcher, then all thrown objects would have to detonate on impact regardless of what it impacts with or you end up with the problems with object interaction that PP has. PP also ONLY models parabolic arcs. This is frustrating when inside bases, because the arc of a thrown object is often high enough to intersect with the upper part of doorways. Arcs hopefully could be either parabolic or elliptic, to simulate objects thrown in as close to a straight line as possible. 

Link to comment
Share on other sites

4 minutes ago, Max_Caine said:

Regarding throwing arcs

At the moment, all discussion has been centered around the assumption that an object when thrown in an arc can reach the landing zone unimpeded. This is possibly true when there is no variance in the landing zone, but what happens when there is variance? There is the possibility of mid-air collisions, where an object on a higher level which had not been previously accounted for in the initial throwing action can impede the movement of the thrown object once the variance of the landing zone has been calculated. PP handles parabolic arcs and scatter variance so there are lessons to be taken away from PP.

 

To begin with, PP gives you no clue as to how far the thrown object will scatter. You choose a point and cross your fingers. You also have no idea if a thrown object will intersect an another object. If it does, the thrown object either explodes if it can, or interacts badly with the object it collided with. It's common in PP for the worms which Chirons launch to end up underneath or inside props, because the engine can't handle it. I think if a proper arc was to be drawn between target and launcher, then all thrown objects would have to detonate on impact regardless of what it impacts with or you end up with the problems with object interaction that PP has. PP also ONLY models parabolic arcs. This is frustrating when inside bases, because the arc of a thrown object is often high enough to intersect with the upper part of doorways. Arcs hopefully could be either parabolic or elliptic, to simulate objects thrown in as close to a straight line as possible. 

I have been playing PP and to be honest the way that grenades thrown or launched keep hitting, for instance, overhanging roofs is a pain in the @#£&, and really very unbelievable as the thrower or launcher would take into account the sodding great building sticking it’s bits in the way. Why is it so difficult to develop a reasonable system for handling things such as this? I have no computer programming skills (too old!) so genuinely want to know.;) 

Link to comment
Share on other sites

This is a reasonably easy question to answer. How much time (and therefore money) can I, as the lead developer, spend on any individual part of the game? Typically, the answer is "not a lot", especially if the part of the game in question only applies to a subset of the game's mechanics. You want to try and keep systems as simple as possible so debugging them is relatively straightforward. In other words, you cheat. Take XCOM's grenades, for instance. There's no scatter (removing the need for a scatter system). You can't throw a grenade on anything except a flat surface (removing the need to work out how thrown objects interact with non-flat surfaces). An arc is drawn between the thrower and the landing zone, but I suspect that this is simply for UI purposes - the arc doesn't play any part in working out where the grenade can go. To prevent grenades from being the only weapon players use, you then artificially restrict the number of grenades a squaddie can carry to ludicrous levels. Hey presto, you have grenades which work and a reasonably fun to use. 

Link to comment
Share on other sites

"reasonably fun to use."

Good advice, hard to follow.  Read the Steam reviews where "Utter piece of crap" follows "best game I ever played."  One player always plays a good guy in RPGs, another loves being pure evil.  Tough crowd.

I still say the key thing is to give the player reasonable knowledge about what effect a weapon is likely to have, since you can be certain that some will love and some will hate it.

Edited by maxm222
clarification
Link to comment
Share on other sites

I like the H.E.Y.V.-Grenade Launcher. That is missing in the most Games like in the old X-Com-Series, XCom EU / EW, the UFO-After-Series and the first UFO Extraterestials.

The Grenade Launcher came in first in XCom 2 and all his DLC´s, UFO Alien Invasion and will come too in UFO2Extraterestials. If the Grenade Launcher is in Phoenix Point I don´t know, because it isn´t on Steam or Battlenet (from Blizzard) yet to test.

The Grenade Launcher is good and should be a upgradeable Weapon. Like the Magnetics with the Guns it can be made more precise, can shoot higher to get lesser barrier-reduction and have a little bit more range. Therfore you can make more Grenades for him (the normal he has already are ok). There I have a R & D which can be done at the beginning to get more Grenades to make it much more interessting.

The desoriantion-Grenade like the Soldiers have (green Grenade head) and the Smoke (with a grey Grenade Head). As a Bonus we can get a Fire-Version (call it Napalm or such) which can be R & D as an Bonusresearch. Like I have seen in the Demo of UFO2Extraterestials they brought in such Variants which are upgradeable like the Rockets and Hand-Grenades in UFO Extraterestials.

As a Bonus Weapon for an Heavy Soldier we can integrate a Rocket Launcher, which can only shoot the straight Way like all the Guns. The Rocket Launcher is much stronger then the Grenade Launcher, but has more disatvangeges.

Here the reasons why the Grenade Launcher is the better option:

1. You have much more ammunition that you can transport.

2. You have much more Variants of Ammonution, because you have Soldier-Hand-Grenades as an template. For the Rocket-Laucher you have Explosive- and Armor-Piercing-Ammonation. Later you can have the EMP-Variant-Ammo as an Bonus.

Therfore the Grenade Launchers in all Armys are used more likely as an Infantery-Attack / Infantery-Defense-Weapon.

3. You have more Shots (max. 5 for the Rocket-Launcher) and Minimum 9 to about 15 for the Grenade-Launcher (3 Shots per Magazine with 3 to 5 Magazines [what is an huge Improvement against XCom 2 and from what I have seen UFO2Extraterestials]).

4. You can shoot with the Grenade-Launcher 3 Times in a Round, with the Rocket-Launcher 1 Times before Reload. [that what I mean with the hughe Improvement against XCom 2 and UFO2Extraterestials which use the Grenade-Launcher like a Rocket-Launcher with 1 Shot and then Reload]

5. You can bring in something else in your second Hand like a knive or such and something else more in the Backback or you can do in a little less in the Backback and use improved Armor instead.

6. A Grenade-Launcher is upgradeable with Alien-Technology (like I announced before). A Rocket-Launcher only in the Tube (better Material) and if its modern in some his Aim-Electronics (which is all!).

There could be more Points for the Grenade-Launcher but that are the important ones.

Edited by Alienkiller
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.

×
×
  • Create New...