.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Ibology > Approaching Infinity

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
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
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:42 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.