With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: Tequila, sparcdr, torhu

Weapon damage and range

Postby torhu » Sat Sep 19, 2009 2:11 am

In reference to Weapon change for a better Smokin Guns. That thread got a bit long, so I'm startin a new one. First subject of discussion is the range of weapons, and how the target distance effects the inflicted damage. :)

The damage done when you hit something, will deteriorate if the range threshold of the weapon is exceeded. The Remington revolver has a 'range' value of 600, and a base damage of 23.

When testing this, I saw that the distance had a lot less effect on the damage than I expected. See this spreadsheet with graph. As you can see, the damage drops to about 21 right away when the distance reaches 600. But after that, it hardly changes. Feel free to play with the data if you like, I have the original Excel file on my HD.

So the question is: What would be a realistic rate of deterioration of damage, and can anyone suggest a formula that can estimate that rate? For reference, the distance from the spawn point bushes to the grey building in Tillian is about 760 units. From the gate to the saloon in Hang 'em High, it's about 1800 units.

The current formula for damage is:
Code: Select all
baseDamage - (1 / sqrt(range / distance ) * 2)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1110
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby dbozan99 » Sat Sep 19, 2009 5:57 am

wow, the graph really helps :)

it would seem that with the default damage of 23 and the range of between 50-100 seems to be reasonable. Although it might be to low. Probably something more along the lines of 200ish.
User avatar
dbozan99
Pistolero
 
Posts: 43
Joined: Thu Jan 22, 2009 5:14 am



Postby moRtem » Sat Sep 19, 2009 9:37 am

dbozan99 wrote:it would seem that with the default damage of 23 and the range of between 50-100 seems to be reasonable. Although it might be to low. Probably something more along the lines of 200ish.


i'd rather say the formular needs a change.


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby moRtem » Sat Sep 19, 2009 10:36 am

btw - very nice post, torhu.

--

i created an alternate formular which provides linear drop of damage in relation to distance

it would also be possible to realise damage drop as a spline or something of that sort aswell

--

to try the two formulars, check the weapon-stats (damage/range) on this topic posted by torhu:
viewtopic.php?t=451


(and of course, it also seems that certain guns need a range-adjustment)

hint: distance of 200 is the way you are able to run when you are pressing move forward for 1 second.



/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby Joe Kari » Sat Sep 19, 2009 12:42 pm

Hi Torhu,

Good post ;)
In your current graph, I think the "falloff speed" is too high, if 1800 units is the distance between the gate and the saloon door in Hangem' High. It's good if the damage decrease with distance, but it should be more subtle IMO.


IMO, the formula should meet few things:
- the falloff should be proportional to the weapon base damage
- the damage should never fall to 0, so the falloff shouldn't be linear


This formula seems good to me:

Damage = BaseDamage * WeaponRange / ( Distance + WeaponRange )

BaseDamage: the damage of the weapon at close range (for distance=0)
Distance: the distance between the shooter and the target
WeaponRange: when Distance = WeaponRange, the target take 50% of damage.

Note that if the Distance is twice the WeaponRange, the target will take 33% of damage, if the Distance is the 3 times the WeaponRange, the target will take 25% of damage, and so on...
User avatar
Joe Kari
SG Team
 
Posts: 878
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby moRtem » Sat Sep 19, 2009 12:54 pm

oi Kari!

I basically like your formular, but you should multiplicate the whole term with 2.

then it's a good prototype i'd say.. but of course it will change weapon-powers a lot and we'll need to test and improve range-settings for the current weapons.

--

about my suggestion to decrease linear: i actually thought that no weapon will fire that far anyhow -- a range of 3000 means, that you need to go into one direction for 15 seconds.

but i prefer your formular


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby moRtem » Sat Sep 19, 2009 1:01 pm

i updated the google-sheet once more by adding your formula, Kari (i just multiplied it with 2 -- and like before, until the weapon-range is reached, the full damage is applied)


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby Joe Kari » Sat Sep 19, 2009 1:29 pm

Hi Mortem,

My intend was that this should take effect even when the weapon's range is not reached ;)
And by the way, using this formula means we should change current WeaponRange value for all weapon (since this will now represent the distance where damage are cuted by 50%). For example, I think that pistol should have something around 3000 for WeaponRange with that formula.

I don't understand how to edit in Google document (the graph doesn't change after I tweaked the non-linear formula).

EDIT:
Finally, I manage to get it work on this google documents ;)
range_kari is the range used by my formula, and IMO, it is best with a value of 5000

As a side note, consider my formula to be close to real life physics, it is just a bit simplified ;)
User avatar
Joe Kari
SG Team
 
Posts: 878
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby moRtem » Sat Sep 19, 2009 3:11 pm

In reallife bullets etc. also get dragged down by gravity and therefor there is a simple upper limit in distance.

I don't think it is necessary to make game more complicated than needed though, since too much realism takes away the fun.

--

about your formular used over the whole range:
i don't think that makes sense -- the gun would be much too strong in the beginning already - and much too strong in far distance (since that should be where the damage drops)

additionally using little ranges (shotgun) within the formular, totally screws the effect of bullets taken power with increasing distance.

--

I think the way i modified it before (using full - current - damage until weapon-range is reached.. and then using your formular multiplied by 2 to get power removed from the bullets with every further unit they fly)


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby Joe Kari » Sat Sep 19, 2009 4:05 pm

No: shotgun are not supposed to have the same weaponRange than pistol, they should have a smaller one.
Something like:
rifle: 7500
pistol: 5000
shotgun: 3000

...should give something good with my formula.

I don't think it is necessary to make game more complicated than needed though, since too much realism takes away the fun.

In fact, this formula is less complicated. lol
And have no conditional part.
And I don't see why this will 'take away the fun' ;)
User avatar
Joe Kari
SG Team
 
Posts: 878
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby moRtem » Sat Sep 19, 2009 4:32 pm

Joe Kari wrote:No: shotgun are not supposed to have the same weaponRange than pistol, they should have a smaller one.


that's out of question i believe

Something like:
rifle: 7500
pistol: 5000
shotgun: 3000

...should give something good with my formula.


like stated before:
"i don't think that makes sense -- the gun would be much too strong in the beginning already - and much too strong in far distance (since that should be where the damage drops) "

i assume that you would increase weapon-damage a bit to keep weapons powerful in their normal-to-use-range (e.g. mid-distance for pistols). If you want to keep colt-peacemaker still doing 30 damage in a distance of 1000 units (using range 5000), you need to increase weapon-damage to 36. At the same time the gun still does 24 damage on a distance of 2500 units and 20 damage on a distance of 5000 units.

In my opinion the weapon should do less than 36 damage at start, and it should do less damage on a distance of 2500 and 4000 units. (2500 units is the distance you are able to walk when holding your forward-key for 12,5 seconds).

sidenote: in br_durango the distance from defender's spawnplace to the money-exit is about ~2000 units

for rifles the formular appears to fit better.

And for shotguns, it's the same as with pistols. Altough the formular appears to be better with range-values below 1000 (for shotguns), since spread is supposed to do the rest.


I don't think it is necessary to make game more complicated than needed though, since too much realism takes away the fun.

In fact, this formula is less complicated. lol
And have no conditional part.
And I don't see why this will 'take away the fun' ;)


you took my sentence out of content --- i replied to your last sentence: "As a side note, consider my formula to be close to real life physics, it is just a bit simplified"

and meant, that not everything that's "realistic" should be necessarely implemented into a game


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby Joe Kari » Sat Sep 19, 2009 8:02 pm

I don't think there will be different formula for each weapon type.
One formula with different params (the WeaponRange value).
User avatar
Joe Kari
SG Team
 
Posts: 878
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby moRtem » Sat Sep 19, 2009 11:00 pm

Joe Kari wrote:I don't think there will be different formula for each weapon type.


same

One formula with different params (the WeaponRange value).


yes -- that's why i think that your formula is the wrong choice to implement

atm my favourite is still your formula multiplied by 2.. and only used when distance > weaponrange (otherwise full damage)


/quit
User avatar
moRtem
Gunslinger
 
Posts: 284
Joined: Sun Mar 15, 2009 5:56 pm



Postby CoolHand » Sun Sep 20, 2009 3:38 am

IMHO, the only weapon that should have reduced damage outside it's range is a shotgun. If you're hit with a bullet, I think it would do the same damage no matter the distance. There should just be modifiers to decrease the chance to hit with those weapons outside they're range (shotguns should have damage decrease and decreased chance to hit). Again, that's just my opinion, take it for what it's worth, but it makes sense to me :)
CoolHand
Pistolero
 
Posts: 49
Joined: Sat Aug 23, 2008 3:16 am



Postby torhu » Sun Sep 20, 2009 6:03 pm

I've added a second sheet to the spreadsheet, called Hits to Kill. This allows you to see more easily how the reduced damage affects your ability to frag someone. It's basically an interactive version of this list.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1110
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Next

Return to Code

Show Sidebar
Show Sidebar

User Control Panel