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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old April 10th, 2015, 03:25 PM

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 Firing range

It seems I don't fully understand the firing range rules. I have a rifle with range 3, but I get "Out of range" message when I try to shoot enemy that is located 2 tiles diagonally + 1 tile orthogonally away from me. At the same time, when enemy is 2 tiles orthogonally + 1 tile diagonally away, I can shoot it with no problem.
What do I miss here?
Reply With Quote
  #2  
Old April 10th, 2015, 05:11 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

Most likely there's something in the way. Something that you can see through but can't shoot through.
Reply With Quote
  #3  
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:
  #4  
Old April 10th, 2015, 10:41 PM

DamienPS DamienPS is offline
Corporal
 
Join Date: Aug 2014
Posts: 138
Thanks: 73
Thanked 8 Times in 6 Posts
DamienPS is on a distinguished road
Default Re: Firing range

In my current game my Spacesuit visible range is 5 and my current weapon is range 1/6 which means if I can see it without cover it's dead.
Reply With Quote
The Following User Says Thank You to DamienPS For This Useful Post:
  #5  
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
  #6  
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
  #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
  #8  
Old April 12th, 2015, 03:43 PM

ibol ibol is offline
First Lieutenant
 
Join Date: Oct 2003
Location: Habablab PA - that's too funny to change
Posts: 717
Thanks: 120
Thanked 167 Times in 111 Posts
ibol is on a distinguished road
Default Re: Firing range

Kazeto's explanation is exactly correct. Thanks!
Reply With Quote
  #9  
Old April 13th, 2015, 02:26 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

Damn, the only case when my father was invited to my school for a "pedagogical talk" was because his son (me) regularily hadn't done his homework on math and geometry...
How complicated is the life of a space adventurer!
Reply With Quote
  #10  
Old April 13th, 2015, 10:22 AM

ibol ibol is offline
First Lieutenant
 
Join Date: Oct 2003
Location: Habablab PA - that's too funny to change
Posts: 717
Thanks: 120
Thanked 167 Times in 111 Posts
ibol is on a distinguished road
Default Re: Firing range

here's something on the topic of "firing" :
have any of you ever seen a "gatling laser" ?
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 03:35 AM.


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