Jump to content

Question about web walking


Woody

Recommended Posts

Rigth now I am reading about A* algorithm to learn how it works. I know that most people who have wrote a web walker has used A*. My question to those people is: how did you first begin creating your very own web walker? Did you do some exercises to practice on A* algorithm or did you learn the function and headed straigth to make a web walker script?

I am really interested in making a web walker, it does not have to be very complex, that can handle easy objects such as doors etc, but I have no idea how to begin. Any tips/ideas?

Link to comment
Share on other sites

A web walker is a lot more than just using the A* path finding algorithm, thats only half the battle. You have to create the "Web" itself using the other half which is an edge weighted graph populated with nodes.

 

Every tile in RS is a Node and the distance between two nodes are the weight associated to that edge. If you have no idea what that is then I would suggest searching up Edge Weighted Graphs first happy.png

  • Like 1
Link to comment
Share on other sites

A web walker is a lot more than just using the A* path finding algorithm, thats only half the battle. You have to create the "Web" itself using the other half which is an edge weighted graph populated with nodes.

Every tile in RS is a Node and the distance between two nodes are the weight associated to that edge. If you have no idea what that is then I would suggest searching up Edge Weighted Graphs first happy.png

How do you retrieve all walkable tiles? Do you have to manually walk around and use something like getRegion() to load the tiles? Are you then supposed to save the tiles/nodes in a file? :)
Link to comment
Share on other sites

I'm not sure what you want to do with all walkable tiles in a global pathfinding system.

You could create nodes at intersections:

659da047f4197f50095f2d639337fa8d.png

with as much detail as you like, you should create a script to assist you.

Then you use A* to compute a path. 

To traverse the edges you either write your own local walking function or use the builtin one.

Your web or whatever people call it is now just a list of nodes (tiles) and associated edges (undirected in this case), which you should indeed store in a file.

 

Link to comment
Share on other sites

I'm not sure what you want to do with all walkable tiles in a global pathfinding system.

You could create nodes at intersections:

659da047f4197f50095f2d639337fa8d.png

with as much detail as you like, you should create a script to assist you.

Then you use A* to compute a path. 

To traverse the edges you either write your own local walking function or use the builtin one.

Your web or whatever people call it is now just a list of nodes (tiles) and associated edges (undirected in this case), which you should indeed store in a file.

 

Hmm.. Sound difficult to get retrieve tiles at intersections, or perhaps I am wrong.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...