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

This Month's Specials

BCT Commander- Save $6.00
World Supremacy- Save $10.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old April 10th, 2015, 06:49 PM
PvK's Avatar

PvK PvK is offline
National Security Advisor
 
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
PvK is on a distinguished road
Default Re: Firing range

I see the same thing, even over open ground, so it's not about obstacles.

2 diagonal + 1 orthogonal is 3 x 2 away, or square root of (3x3 + 2x2 = 13), so that is over range 3, and makes sense it is out of range.

1 diagonal + 2 orthoganal is 1 x 3 away, or square root of (3x3 + 1x1 = 10), so that's just a hair over absolute range 3 (square root of 9), so it seems the game uses actual distance according to the Pythagorean formula, but with a slight nudge.

Last edited by PvK; April 10th, 2015 at 07:13 PM..
Reply With Quote
The Following User Says Thank You to PvK For This Useful Post:
  #2  
Old April 11th, 2015, 02:16 AM

Tarkh Tarkh is offline
Private
 
Join Date: Mar 2015
Posts: 24
Thanks: 9
Thanked 5 Times in 4 Posts
Tarkh is on a distinguished road
Default Re: Firing range

Quote:
Originally Posted by PvK View Post
it seems the game uses actual distance according to the Pythagorean formula, but with a slight nudge.
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...?
Reply With Quote
  #3  
Old April 11th, 2015, 03:23 AM
PvK's Avatar

PvK PvK is offline
National Security Advisor
 
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
PvK is on a distinguished road
Default Re: Firing range

Because if you count tiles on a square grid, then things end up with square fields of vision and square fields of fire, and diagonal movement and combat/spotting have a ~40% advantage, which is weirder and looks gamey-er than having correct range, even if movement is still in even grid chunks.

Although, it seems that movement isn't entirely treated the same way, at least for oxygen use - I'm not sure if time for diagonal movement is +40% or not - it should be.
Reply With Quote
  #4  
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
Reply

Bookmarks


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 09:02 AM.


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