View Single Post
  #3  
Old May 18th, 2009, 03:47 AM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Diagonal Distance/Range

It's almost the Manhattan metric. The game calculates the distance between (x0,y0) and (x1,y1) by

dx = |x0-x1|
dy = |y0-y1|

r = dx+dy

if (dx > 0 and dy > 0) --r
if (dx > 3 and dy > 3) --r
if (dx > 6 and dy > 6) --r
if (dx > 9 and dy > 9) --r
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote
The Following 2 Users Say Thank You to lch For This Useful Post: