.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Diagonal Distance/Range (http://forum.shrapnelgames.com/showthread.php?t=43095)

lch May 19th, 2009 05:10 AM

Re: Diagonal Distance/Range
 
Quote:

Originally Posted by Micah (Post 691688)
I think the "if (dx>0...)" bits subtract 1 from the range for each of those pairs that are true

Yeah. Normally, arrows would ignore diagonal movement and range would be determined as if they'd fly all the way to the front and then all the way to the side. That's the Manhattan metric, like a taxi cab that has to calculate distance by moving through the city blocks. If there is a greater amount of diagonal movement involved, though, then the game acknowledges that and allows for a little leeway by reducing the total distance a bit.

I'd think that this formula was chosen to speed up processing mostly.


All times are GMT -4. The time now is 04:28 AM.

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