Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: More realistic (and balanced) projectiles.  (Read 3146 times)

WJLIII3

  • Bay Watcher
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #15 on: November 13, 2008, 02:02:29 pm »

I think that the best system I have devised thus far is the one involving 1 - 7 and the arrow changing states every few squares, to simulate an arc.

I think so to, the other methods just needlessly complicate things. The issue is, even that method, the best of the ones you've devised, isn't as good as the one already in place. It's to loose, overlooks to many things, and as we've seen, trying to account for those things produces exponential growth in complexity. Its a neat concept, but its just unnecessary.
Logged

Pie

  • Bay Watcher
  • Winner of the "most disturbing avatar" award.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #16 on: November 13, 2008, 02:58:15 pm »

I honestly can't see any problems in it. Basically, when you create a creature, you state what fills which area. The standard one would be head, then body and arms, then legs, but you could dictate which order they would be in. Midair targets could be resolved by making it so that if an arrow misses below (is at 1) it falls to the z level with ground, directly below it. If it goes over the top (is at 7), it just continues moving in the same line it was until Toady's code would normally tell it to fall.
I reckon this system would make arrows way more realistic, as in real life, arrows fly in an arc and only great archers can get their arrows to land on the target rather than over or above the target. It would balance projectiles in a way in which simply reducing the rate of fire would not (as reducing the max rate of fire would make there seem to be little difference between a good archer and a bad one). It does not require an exponential growth in complexity. In fact, you could code this fairly simply I think, so long as you could get the arrow to change properties (such as area affected and percentage chance to hit) after it had been fired.

This system could also take into account sizes and height. So a kitten may have ALL of its body parts on number 1, and a giant would be spread over all 7.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #17 on: November 13, 2008, 05:43:26 pm »

The to-hit chances are already weighted, and they will be more precisely in the next version with relative body part sizes.  As for the 1-7 height thing -- ballistic trajectories would be nice, yeah, but those require a lot more work than just adjusting hit rolls.  And even when projectiles do follow a realistic trajectory, it would not make sense to use your 1-7 system when the body definition will have much more fine-grained and flexible ways of weighting hit chances.
Logged

Pie

  • Bay Watcher
  • Winner of the "most disturbing avatar" award.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #18 on: November 13, 2008, 05:57:51 pm »

The to-hit chances are already weighted, and they will be more precisely in the next version with relative body part sizes.  As for the 1-7 height thing -- ballistic trajectories would be nice, yeah, but those require a lot more work than just adjusting hit rolls.  And even when projectiles do follow a realistic trajectory, it would not make sense to use your 1-7 system when the body definition will have much more fine-grained and flexible ways of weighting hit chances.
Ah, but you can have that flexible, fine-grained weighting ON TOP OF my trajectory system. So the numbers select which general height area the projectile hits (or doesn't as the case may be) and then Toady's system weights certain parts of the body.

Because, logically speaking, if a projectile is going at head height, there is no chance at all that it will hit the guy's feet. So my system is a sort of extreme weighting, which basically makes range and skill important.

Golgath

  • Bay Watcher
    • View Profile
    • Avatar Source
Re: More realistic (and balanced) projectiles.
« Reply #19 on: November 13, 2008, 09:41:36 pm »

Does anyone arguing with Pie remember any of his previous threads?
Logged
I fully endorse the idea of mountain goats that hunt man.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #20 on: November 13, 2008, 10:51:31 pm »

The to-hit chances are already weighted, and they will be more precisely in the next version with relative body part sizes.  As for the 1-7 height thing -- ballistic trajectories would be nice, yeah, but those require a lot more work than just adjusting hit rolls.  And even when projectiles do follow a realistic trajectory, it would not make sense to use your 1-7 system when the body definition will have much more fine-grained and flexible ways of weighting hit chances.
Ah, but you can have that flexible, fine-grained weighting ON TOP OF my trajectory system. So the numbers select which general height area the projectile hits (or doesn't as the case may be) and then Toady's system weights certain parts of the body.

Because, logically speaking, if a projectile is going at head height, there is no chance at all that it will hit the guy's feet. So my system is a sort of extreme weighting, which basically makes range and skill important.

Dividing the body into 1-7 equally likely areas by height is only useful when projectiles are traveling horizontally.  This assumption is not valid even with the current straight-line trajectories, and will become even more invalid with parabolic trajectories.  It also assumes that the chance of such a projectile hitting a body part within a given height range does not depend on the orientation of the victim and the direction from which the projectile strikes.  Yes, you could do additional weighting and trigonometric adjustment and slap a million bandaids on an obviously flawed system, or you could toss it.  The fact that your system only works elegantly for projectiles that are traveling perfectly perpendicular to the coronal plane (i.e. none of them) should push you toward the latter.

I'd propose an alternative but there's really no point since this is all going to depend very heavily on the abilities of the new body part sizing and positioning, which we haven't seen yet.
« Last Edit: November 13, 2008, 10:56:29 pm by Footkerchief »
Logged

Pie

  • Bay Watcher
  • Winner of the "most disturbing avatar" award.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #21 on: November 14, 2008, 11:04:32 am »

Dividing the body into 1-7 equally likely areas by height is only useful when projectiles are traveling horizontally.  This assumption is not valid even with the current straight-line trajectories, and will become even more invalid with parabolic trajectories.  It also assumes that the chance of such a projectile hitting a body part within a given height range does not depend on the orientation of the victim and the direction from which the projectile strikes.  Yes, you could do additional weighting and trigonometric adjustment and slap a million bandaids on an obviously flawed system, or you could toss it.  The fact that your system only works elegantly for projectiles that are traveling perfectly perpendicular to the coronal plane (i.e. none of them) should push you toward the latter.

I'd propose an alternative but there's really no point since this is all going to depend very heavily on the abilities of the new body part sizing and positioning, which we haven't seen yet.

Ah, but parabolic trajectories would involve going up z-levels, and then down z-levels in a calculated arc, with presumably the angle of the arrow at any given point having to be calculated. It seems to me as if you are saying: "your system would become massively complex if we were to simulate arrows in every aspect of their nature", without considering the fact that every aspect of an arrow's nature (such as the angle that the arrow enters the body in relation to the alignment and composition of the body that is being hit), without considering the fact that ANY system that incorporates those factors into the system would become bloody complex.

The 1-7 system is vastly more simple than calculating an arc and then having an arrow fire through that arc (and multiple z levels) to the target. For that system, you would have to figure out if the arrow would collide with something on its way (like a ceiling), as you wouldn't want crossbowdwarves to be endlessly pumping steel bolts into the roof of your fort while the goblins invade. The 1-7 system could relatively easily be built onto the existing system, and if, at some stage, the almighty Toady manages to incorporate proper arcs etc it would probably require changing of almost everything about bolts anyway.
 
The 1-7 system is designed to encompass MOST scenarios and simulate them in a way which seems realistic. So MOST of the time, an arrow fired at someone that comes into the area which they occupy at head height will hit them in the head region. It could arguably miss everything except for their little toe in real life, but this would be so unlikely as to render the probability effectively naught.

Oh, and as Toady has stated about straight objects causing straight line wounds, there is nothing to stop it saying that the start point of the wound is dictated by the 1-7 system, but then the arrow goes in a randomly angled straight line. This would, for all intents and purposes, simulate arcing arrows in a really believable way.

I mean, I understand where you are coming from, but at the end of the day, DF is all about creating a FEELING of the real world, rather than actually simulating the real world entirely. An obvious example would be the water physics system, which could in theory simulate every particle of water every single second, but would make little actual difference.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #22 on: November 14, 2008, 03:37:53 pm »

I'm trying not to give a line-by-line reply because those are annoying.  So here's a counter-rant.

Yes, any system that simulates projectiles properly will become complex.  But your system will still be unnecessarily complex to begin with, because there is no rationale for dividing body parts into a fixed set of areas, especially when you use height as the sole determinant in a 3D body system.  Trying to shoehorn all possible situations into that system will yield problems even with current gameplay situations.

I brought up parabolic arcs because you claimed your system would model those realistically, which it can't.  Okay, parabolas are hard, I grant that.  But as I already explained, your system can't even handle simple, common situations like marksdwarves shooting (with straight-line trajectories) from towers at steep angles.  You can't glibly say "MOST of the time" and dismiss 90% of all encounters (depending on one's play style, naturally).

The angle of impact doesn't only affect chances of hitting organs within a body part, it also affects what body parts are going to get hit.  For example.  A humanoid shot from directly above will almost certainly get struck in the head or shoulders, because his lower body is rarely wider than his shoulders.  Simple scalar weighting cannot solve this -- you would basically have to include a trig function of angle as a weighting factor (let me know if you this is gibberish to you), and that function would have to be handcrafted for every single body part in every body template.

Now that we've done that, we have to account for rare, unheard-of situations like getting shot in the back, i.e. horizontal angles, which requires an additional trig function for every body part.  And these functions aren't just "3sin(theta)," they are piecewise monstrosities that will takes ages to construct.  Notice that the 1-7 is totally useless at this point -- everything is being determined by the weighting functions, not that they're a good approach either.  They are bandaids on a compound fracture.

It's interesting that you mention starting points and directions of wound paths, because that approach (i.e. using body part positioning) will apply outside of the body as well.  What you're doing is trying to use one system for external impacts, and another for internal impacts, when in fact it can ALL be handled by one system -- one that should be able to use relative part sizes and positions in conjunction with direction of impact to generate a rough wounding silhouette on the fly.  Unless you're suggesting having miniature 1-7s for organs within each body part, in which case I give up.
« Last Edit: November 14, 2008, 04:25:02 pm by Footkerchief »
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #23 on: November 14, 2008, 04:20:33 pm »

Look, it's obvious that the only way to resolve this is to incorporate the Spore creature creator into the raws, and then import it into the unreal engine to do the arrow simulation...

Pie

  • Bay Watcher
  • Winner of the "most disturbing avatar" award.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #24 on: November 14, 2008, 05:09:17 pm »

I'm trying not to give a line-by-line reply because those are annoying.  So here's a counter-rant.

Yes, any system that simulates projectiles properly will become complex.  But your system will still be unnecessarily complex to begin with, because there is no rationale for dividing body parts into a fixed set of areas, especially when you use height as the sole determinant in a 3D body system.  Trying to shoehorn all possible situations into that system will yield problems even with current gameplay situations.

I brought up parabolic arcs because you claimed your system would model those realistically, which it can't.  Okay, parabolas are hard, I grant that.  But as I already explained, your system can't even handle simple, common situations like marksdwarves shooting (with straight-line trajectories) from towers at steep angles.  You can't glibly say "MOST of the time" and dismiss 90% of all encounters (depending on one's play style, naturally).

The angle of impact doesn't only affect chances of hitting organs within a body part, it also affects what body parts are going to get hit.  For example.  A humanoid shot from directly above will almost certainly get struck in the head or shoulders, because his lower body is rarely wider than his shoulders.  Simple scalar weighting cannot solve this -- you would basically have to include a trig function of angle as a weighting factor (let me know if you this is gibberish to you), and that function would have to be handcrafted for every single body part in every body template.

Now that we've done that, we have to account for rare, unheard-of situations like getting shot in the back, i.e. horizontal angles, which requires an additional trig function for every body part.  And these functions aren't just "3sin(theta)," they are piecewise monstrosities that will takes ages to construct.

It's interesting that you mention starting points and directions of wound paths, because that approach (i.e. using body part positioning) will apply outside of the body as well.  What you're doing is trying to use one system for external impacts, and another for internal impacts, when in fact it can ALL be handled by one system -- one that should be able to use relative part sizes and positions in conjunction with direction of impact to generate a rough wounding silhouette on the fly.  Unless you're suggesting having miniature 1-7s for organs within each body part, in which case I give up.

Ok, there is only 1 example that I can think of in which my system would produce an unlikely result. That is a dwarf many z-levels down shooting up across a very few squares (so shooting at a target which is far higher than itself. My system would result (probably) in the guy at the top being hit in the head. However, the example with the dwarf on top of a tower shooting down is simulated properly. He is most likely to hit in the head or high torso. If the target was further away from the tower, he would be more likely to be hit in the chest or feet. Also, is it even possible for dwarves to shoot from towers at steep angles? As far as I knew, the height of the tower dictates the minimum distance away that they can shoot, so a 2 z level high tower would only be able to shoot at a target 2 squares away from the wall. I didn't glibly say MOST of the time :P.

As for you talking about making a trig function, I think you are missing the fact that the game does not SHOW the angle that an arrow enters the dwarf. That is all down to imagination. I don't see how a random wound line wouldn't perform basically the same (at least on the surface) as a carefully calculated line. If the worst comes to the worst, you could simply see if the dwarf's target is above or below the dwarf, and alter the rules accordingly, to change the type of arc. And the reason that I divided the body parts into heights was to enable the arrow to hit a realistic area. I mean, if Toady's current system represents heights better than this, you could simply apply the height principal to the arrow and use Toady's height system. It doesn't have to be divided into 7s, but I do think it has to be divided, to allow for realistic projectiles.

And getting shot in the back is the same as getting shot in the front in my system, I'll grant you, but does it really matter? it isn't like the player can tell the orientation of an object anyway, and if you could, you could easily adjust the system to incorporate the direction the character was facing.

Oh, and one thing I forgot to mention as a possibility would be to have it so that the 1-7 system also dictates some randomization in range, so basically the computer selects a number between, say 2 and 5, which dictates how long the arrow remains in each state. a 5 would mean it would move a total of 35 squares and a 2 would mean 14. Just a thought.

I also don't see how Toady would incorporate body part positioning into his simulation of external impacts from projectiles. I have a feeling (but I could well be wrong) that it will be more along the lines of "select body part randomly, with weighting placed on larger parts, draw random wound line from there". Which is all well and good, but does not incorporate ranges at all. So you could shoot a guy from point blank range and you would have greater chance of hitting his MASSIVE left testicle than his head. But then again that is based on a few assumptions.



Ok, seeing as how I seem to be getting flak for suggesting a practical solution to the problem, here it is. Perhaps someone else has a better suggestion than mine.
  • Range should affect where an arrow hits (or possibly just the randomness)
  • Skill should have an effect on the effect of range (so skilled archers perform better than poor archers over longer ranges)
  • Projectiles should travel in arcs


Also, is it just me or do most of my threads turn into vast, unscalable walls of text mere minutes after their creation? :3

Pie

  • Bay Watcher
  • Winner of the "most disturbing avatar" award.
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #25 on: November 14, 2008, 05:12:50 pm »

Look, it's obvious that the only way to resolve this is to incorporate the Spore creature creator into the raws, and then import it into the unreal engine to do the arrow simulation...
Haha, what is funny is that the spore creature creator is utter shit compared with (at least in the future) the dwarf fortress creature creator. Also, it would be far more useful to simulate stuff like the arrow in a physics dedicated engine.
 

Veroule

  • Bay Watcher
    • View Profile
Re: More realistic (and balanced) projectiles.
« Reply #26 on: November 14, 2008, 05:52:14 pm »

The only right way to do this is to break the current [SIZE] tag down into separate x,y,z sizes.  Then shooting F levels up can tell that the dwarf doesn't have line of sight and has to shoot a balistic trajectory on the tile.  At that point we can figure the dwarf's accuracy to even hit that tile.  Assuming he/she hit the tile then we can look at the x,y size of the creature compared to the x,y size of the tile to determine whether the shot hits the creature.

Awww sheet, the x,y size of a tile is undefined.  There is a whole frakload more to calculating thiis stuff realistically then you realize.

At some point Toady may do it totally right.  That would have some dwarf sounding an alarm and shouting, "they are on the ridge...there!"  Even though other dwarves can't see them they begin firing, shooting not at a specific creature, but at the place.  That time might be sooner then you think, and might be much later then I would like.

Either way this is the type of stuff Toady is working on now, and it is good to voice different ideas about it.  Perchance we will conceive something more interesting or easier then what he was considering, and maybe even such an idea will achieve immediate development.

Don't just shoot a guy down, expand on whatever idea he had.  Change it a little if need be, but always add something to the idea.  Let Toady decide what ideas are total garbage.
Logged
"Please, spare us additional torture; and just euthanise yourselves."
Delivered by Tim Curry of Clue as a parody of the lead ass from American Idol in the show Psych.
Pages: 1 [2]