Thread: Firing range
View Single Post
  #7  
Old April 12th, 2015, 02:47 PM

Kazeto Kazeto is offline
Private
 
Join Date: Dec 2014
Posts: 46
Thanks: 60
Thanked 22 Times in 18 Posts
Kazeto is on a distinguished road
Default Re: Firing range

Quote:
Originally Posted by Tarkh View Post
It'd be great to hear from Bob how exactly things are. Why should game use Pythagorean formulae when range is calculated in tiles, not in abstract numbers? Or...?
Because the only case in which calculating range by simply counting the distance on the grid won't give you weird results that defy common sense is when you are using a hexagonal map.

That being said, I think that the value used for calculating the range via use of Pythagorean formulae is actually the range plus half a tile. That's a fairly common thing when you want to have an outer range area that is as close to being a circle as possible.

If that were the case, then with range of 3 you'd get 3,5 instead, which when multiplied by itself gives 12,25. And that means you'd be able to shoot at something that is 3 tiles in one direction and 1 in the other from you (as (3*3)+(1*1) equals 10), but not at something that is 3 tiles is one direction and 2 in the other (as (3*3)+(2*2) is 13, which is above 12,25).

Mind you, I'm not saying that this is guaranteed to be the case, but it is a rather simple and effective solution so I wouldn't be surprised if it was. If you want to make sure, you'd have to play with weapons that have different ranges to make sure.
Reply With Quote