The Daily Click ::. Forums ::. Klik Coding Help ::. obstacle pathfinding moves?
 

Post Reply  Post Oekaki 
 

Posted By Message

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1969

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
22nd August, 2009 at 04:17:16 -

I think we've all been misunderstanding each other a bit.
Maybe now I get what you're doing though...

You're not calculating the line of sight at all, are you?
I just guessed you were because you called your objects "visible region" not "reachable region" or something like that.

Then for the range, you're just using the euclidean distance, rather than the chebyshev distance - which is why you get a more circular shape (compared to chebyshev which produces a square, or manhattan which produces a diamond).

You can get the same result by increasing the cost of a diagonal move to the squareroot of 2 - which you can do using the pathfinding extension.

I don't personally like this system anyway. As a player, if I have a tank with a movement rating of "5", I want to be able to just count out 5 squares. I don't want to have to mess around finding the sum of the squares of whatever...
I appreciate that it does depend on the game though.

Anyway, it's quite impressive if you've done that without extensions, but you could have saved yourself a lot of effort...


 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
22nd August, 2009 at 10:54:32 -

Originally Posted by ~Matt Esch~
Don Luciano.

Line of sight is clearly not what was achieved from the example I looked at. It actually gave some squares you would cross out as was done so in a previous post. I could only assume that you would want to display the attainable square (i.e. a square that a path exists for). So evidently the squares that you can see are places that can be reached within the specified radius and would test line of sight to those positions independently (i.e you wouldn't attempt to go to a destination that you couldn't see, even though there is a possible path for it). If you are just interested in a region available in the line of sight then that's just an additional restriction of the grid I am displaying. Basically what that means is: you should keep your retarded comments to yourself.

I have no idea what you are talking about, but i never said my example uses line of sight. It clearly doesnt.

 
Code me a sausage!
   

Post Reply



 



Advertisement

Worth A Click