Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Calculating shot hit percentage based on tile distance

$
0
0
With permission to remake a game, I'm trying to figure out its shot hit percentage formula, or at least be close. Everything I try is terrible. Any ideas? The max tile range is 23, and the expected result should be as close to the following as possible: Tile Distance Hit% 23 1.05% 22 1.2% 21 1.38% 20 1.6% 19 1.86% 18 2.19% 17 2.6% 16 3.12% 15 3.79% 14 4.66% 13 5.82% 12 7.4% 11 9.61% 10 12.8% 9 17.55% 8 25% 7 37.31% 6 59.25% 5 100% 4 100% 3 100% 2 100% 1 100% 0 100% EDIT: To explain better, the game is a 2D tile game. The character will fire at the enemy from a tile range between 0 and 23.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>