Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
191 plots causes crash
#3
It was my fault, it was an array over-run
:oops:
here is a distance function to make up for it:
Code:
Function distance (x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer) as Integer
Dim x as Integer
x=ABS(x1-x2)
Dim y as Integer
y=ABS(y1-y2)

Return Sqr((x^2)+(y^2))
End Function


this bresenham line drawing algorithm lets you do line-of-sight to see if 2 units can see each other in a game
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)