0
\$\begingroup\$

I'm trying to make a top-down game using javascript and Pixi which involves multiple different guns. Instead of giving each gun an individual damage value, I wanted to calculate the damage by the bullet's dimensions and velocity as it leaves the gun (which is all available on Wikipedia) However, I'm having issues where despite some damage values looking okay (eg UMP-45 has about 40, Mac-11 has about 22, TEC-9 has around 35 and glock has about the same) some values are too high to offer a challenge to the player (AK47 has 110, M4A1 has 220, Desert Eagle has 100+)

The current calculation I'm using is ((velocity x bulletlength)/1000) x (bulletradius/2)

Anyone have any ideas for tackling this issue, or is it best to just use straightforward values? The game would be a horde-like sandbox game, so the damage values cant be too low or it would be almost impossible.

Thanks in advance.

\$\endgroup\$
  • \$\begingroup\$ Make the AK ammo costy. Those things can hit trough multiple steel plates and still cause a deadly shot in the real world. \$\endgroup\$ – Bálint Oct 24 '16 at 8:47
  • \$\begingroup\$ ah! i never even considered ammo rarity and cost. yes, that sounds like a relatively good solution. plus i thought maybe instead of having normal bullet penetration where the damage just gets reduced, id go for a more realistic model of an immediate damage increase but increased damaged fall off too \$\endgroup\$ – JellyWX Oct 24 '16 at 8:50
  • \$\begingroup\$ Lemme post it as ab answer \$\endgroup\$ – Bálint Oct 24 '16 at 8:54
1
\$\begingroup\$

You could change your calculation to make it more fair. That is just trial and error until you are pleased.

What are the properties common to weapons you want to reduce? If you realize bullet size for example has too much impact, use sqrt(bulletradius) instead, change your values a little bit, see if it fits, then try again if not, until you finally get the formula you want.

\$\endgroup\$
  • \$\begingroup\$ sounds like a good idea, except that some weapons are effected more heavily by different properties (eg the glock gets its firepower from the bulletlength, whereas the m4 gets it from the velocity). ill have a play with it though and find something that works \$\endgroup\$ – JellyWX Oct 24 '16 at 10:57
0
\$\begingroup\$

AKs and M4s are very strong. If you've ever played with an FPS like COD, then you know that you can't really do anything useful against a person with a higher end weapon using a pistol.

To balance things you could make the ammo for bigger guns more costy

\$\endgroup\$
  • \$\begingroup\$ sounds like a valid idea, combined with realUser404's answer. maybe make enemies that are less vulnerable to other bullets to give rifles a proper use and nerf their overall power and usefulness, since players will want to preserve ammo for different enemies \$\endgroup\$ – JellyWX Oct 24 '16 at 10:56
0
\$\begingroup\$

http://www.shooterscalculator.com/bullet-kinetic-energy.php It's a bullet kinetic energy calculator.

But I suggest to put all results of calculation to game configs. It is more easy way to balance things. Not reason to re-calculate already calculated things.

Then use pre-defined shapes as multiplier. Let's say you have shape1 = 0.8 and shape2 = 1.4, and you have a flying bullet with kinetic energy = 10; then your damage = 10 * shape1 = 8; or same bullet with different shape will be 10 * shape2 = 14. Same value you can also use to calculate reducing speed of the bullet.

\$\endgroup\$
  • \$\begingroup\$ but damage should be factored not only off energy but off bullet size and shape. i know a bit of physics myself, so finding out the energy of bullets shouldn't be too difficult. \$\endgroup\$ – JellyWX Oct 24 '16 at 10:53
  • \$\begingroup\$ Then use pre-defined shapes as multiplier. Let's say you have shape1 = 0.8 and shape2 = 1.4, and you have flying bullet with kinetic energy = 10; then your damage = 10 * shape1 = 8; or same bullet with different shape will be 10 * shape2 = 14. Same value you can also use to calculate reducing speed of the bullet. \$\endgroup\$ – Vladimir Ishenko Oct 24 '16 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.