of     2   
chevron_rightchevron_rightchevron_right

lah30303
#21083266Monday, February 15, 2010 3:14 AM GMT

http://www.roblox.com/Working-on-pathfinding-item?id=22333228 Right now it's only a very basic version. I'm going to be working on it to make it much faster and easy to use. Right now it requires a 2 dimensional table, there are several ways to make one, I like to make it like this so I can really see what it looks like Table = { {1,1,1,0,1,1,1}, {1,1,0,0,1,1,1}, {1,1,0,1,1,1,1}, {1,0,0,1,1,1,1}, {1,0,1,1,1,1,1}, {1,0,0,0,0,0,0}} Please note that the above is just an example of what a map made out of a table would look like. The 0's are walkable areas, and the 1's are "walls" (or just bottomless pits if you want to think imaginatively :3). After creating that, you run the pathfinding functions like this.. for i, v in pairs(CalcPath(CalcMoves(Table, 4, 1, 7, 6))) do print(v["x"], v["y"]) end 'woah, what?!' Really all you need to look at is this: CalcMoves(Table, 4, 1, 7, 6) The 4 and the 1 are the starting x and y spots. If you look at the table I made (just know that y is increasing as it goes down, not up, so it starts with 1 at the top), 4, 1 is at the top, with 4 going accross and y going down. The 7, 6 works the same way, except it is the targed spot on the map to get to. Now, useing what I said before: for i, v in pairs(CalcPath(CalcMoves(Table, 4, 1, 7, 6))) do print(v["x"], v["y"]) end The output will look like this: 4 1 4 2 3 2 3 3 3 4 2 4 2 5 2 6 3 6 4 6 5 6 6 6 7 6
fuzzthedog
#21084413Monday, February 15, 2010 3:35 AM GMT

Or bottomless pits if you're thinking Mario.
lah30303
#21084585Monday, February 15, 2010 3:38 AM GMT

Yesh
lah30303
#21176466Tuesday, February 16, 2010 8:21 PM GMT

Bump
lah30303
#21177347Tuesday, February 16, 2010 8:38 PM GMT

I'd post the whole script, but it's too big and I just get an error when I try to post it.
lah30303
#21188703Tuesday, February 16, 2010 11:22 PM GMT

Bump
lah30303
#21378288Saturday, February 20, 2010 2:39 PM GMT

bump
lah30303
#21454597Sunday, February 21, 2010 6:24 PM GMT

bump
MtlMario64
#21460807Sunday, February 21, 2010 8:00 PM GMT

Is it A* or random spreading?
lah30303
#21505957Monday, February 22, 2010 7:53 PM GMT

It's A*
lah30303
#21512127Monday, February 22, 2010 9:51 PM GMT

Forgot to mention above. :3
lah30303
#21522256Tuesday, February 23, 2010 12:13 AM GMT

Bump
lah30303
#21527592Tuesday, February 23, 2010 1:26 AM GMT

Bump
lah30303
#21733263Saturday, February 27, 2010 4:49 PM GMT

bump
lah30303
#21752945Saturday, February 27, 2010 10:24 PM GMT

bump
lah30303
#21753184Saturday, February 27, 2010 10:27 PM GMT

This pathfinding method is 100% accurate in finding the fastest path possible. If there's a way, itt'le find it.
lah30303
#21787332Sunday, February 28, 2010 1:32 PM GMT

bump
lah30303
#21811610Sunday, February 28, 2010 8:59 PM GMT

bump
lah30303
#21915531Wednesday, March 03, 2010 12:33 AM GMT

Bump.
billyjim
#21917518Wednesday, March 03, 2010 1:03 AM GMT

im lost :l
lah30303
#21966096Thursday, March 04, 2010 3:10 AM GMT

Over time I will be updateing it to make it easier to understand. Try just following the example in the script.
lah30303
#21980076Thursday, March 04, 2010 7:49 PM GMT

Bump
lah30303
#22024887Friday, March 05, 2010 9:19 PM GMT

bump
lah30303
#22043312Saturday, March 06, 2010 2:09 AM GMT

Bump
DrAgonmoray
#22048332Saturday, March 06, 2010 3:16 AM GMT

Let's say I did something like this... (lets say I wanna make the Ai start in the top left, and go to the bottom right) table = { {0,0,0,0,0}, {0,0,0,1,0}, {0,1,0,1,0}, {0,1,1,1,0}, {0,0,0,0,0)) Would it get stuck in that little area of 1s?

    of     2   
chevron_rightchevron_rightchevron_right