how path finding works ?

02/11/2013 05:02 go for it#1
TL;DR
title says pretty much everything
all what i know and could think about is the folllowing
you are at 0,0 and you want to go to 150,179
you get distance between (destination - current coord) / (distance you can jump at once) and call it maybe point displacement
and send packets each time + that point until reaching the destination
but what if you can't jump at some coords ? how you get the coords you may jump and may not jump to so you can create random list for available alternatives and start using shortest cost path theories ?


all in all , how an advanced path finding / proxy tele. works ?
thanks
pming working fine on my account :cool:
02/11/2013 05:20 pro4never#2
There's many, many ways of handling pathfinding.

One of the most popular algorithms is the A* algorithm which maps out your route assigning weights to each movement. The path with the lowest cost is the most efficient one to take.

There's a few other proper pathfinding algorithms out there which are commonly used but you're probably best off just looking up A* and going from there.
02/11/2013 05:48 go for it#3
Quote:
Originally Posted by pro4never View Post
There's many, many ways of handling pathfinding.

One of the most popular algorithms is the A* algorithm which maps out your route assigning weights to each movement. The path with the lowest cost is the most efficient one to take.

There's a few other proper pathfinding algorithms out there which are commonly used but you're probably best off just looking up A* and going from there.
first of all thanks for helping me out and yup i know some about that algorithms but that's not everything that i still need to know
lets make it in form of questions to be more clear
does the server check if where you want to jump to is valid or not ?
how you know if this point you are trying to reach is a valid or not ? from dmaps files ? by sending to the server and let the server decided ?

what i'm planning to do is the following

recursion method {
if you reached destination then return
get shortest path
jump there
recursion
}

and the main problem is that the shortest path may not be a valid coord on the map which to why i want to know more about if the server should check for each jump if it's for valid point or not
and if it does , how may i do the same check to chose another point using that algorithms , got me :) ?

edit : i got another question please :)
at proxies (conquerAI , chrome , pla pla ) they display a map and user click anywhere there to be teleported there , how they get the cursor position at the picture click event ?
02/11/2013 06:12 pro4never#4
Both of those are pretty simple to answer.

#1: The server checks validity of movements. It will disconnect you if you move somewhere invalid (too far, height difference or distance) You use the client files (dmap files + some others) to determine if a location is valid.

#2: Bots display a picture, they then use a click event on that picture to determine coords. Generally in these pictures there's a scale (1:1 where each coord = 1 pixel or larger). They then just take the coords of the picture you clicked and multiply by scale and find the closest valid coord to where you clicked and build a path there.