Log in

View Full Version : World walker help please



ReadySteadyGo
03-15-2011, 05:06 AM
Ok I've thought up a new way of doing a word walker which wouldn't require a web as it would be able to generate it's own on the fly which I'm pretty sure would be faster.

I need to solve a couple of things. First problem:

http://piczasso.com/i/1w8z9.png

It would need to be able to recognise that it needs to travel to x in order to reach B.

The only way I can think of to do this is to scan outwards either side of the direct (and invalid) path until it finds a gap. Like so:

http://piczasso.com/i/t3fiv.png

Is this the best way to do it?

Train
03-15-2011, 05:13 AM
Looks good. ;]

Boreas
03-15-2011, 05:54 AM
You need to head towards the destination until you are blocked, and thats's point 1. Then from there you go out with increasing angles away from straight ahead until you can farther than a minimum distance, so you have a point 2 on either side. You repeat this until you get a bunch of points hugging the wall (think of cropping a person out of a photo). Then go through the points until you find first point that doesn't have a clear line of sight to B, and then forget the points between. Rinse and repeat from that point.

Well that's what I was working on a couple years ago. But then I decided that making A X and B nodes on a web (and making a function that would find it's own way between them by blind clicking) makes more sense for RS. You don't need to be able to walk to _any_ tile in RS. There are a finite number of banks and training spots, which can all be nodes, and, if there are enough nodes, a point that isn't a node can use blind click to the closest node. Then again that was with walkable areas being defined as TBoxes in a INI, if nowadays you can easily get a map of walkable vs unwalkable tiles, then maybe it would be worth it. Also keep in mind that webs can support doors/ladders/gates, and dangerous areas with min combat, and maybe teleports and boats etc.

Smartzkid
03-15-2011, 06:31 AM
This (http://stackoverflow.com/questions/2798/map-routing-a-la-google-maps) StackOverflow answer gives a good summary of path calculation techniques

ReadySteadyGo
03-15-2011, 01:29 PM
Thank's for the information. I've come round to the thinking the webs are the most sensible way. Has anyone created a working one?

**BANNED The Man
03-15-2011, 05:19 PM
Check my thread in Research and development section :)