Blockland Forums > Modification Help

Making a pathfinder by mapping bricks

Pages: << < (2/4) > >>

Demian:

Which reminds me that Flaw did exactly this. Placed 8x8 plates in a random formation and the bot ran through the shortest route from point A to B.

Ephialtes:

That's not literal pathfinding - that's pathfinding with the aid of waypoints. Entirely different, with waypoints it's easy.

Destiny/Zack0Wack0:

Let me make some guesswork, I've never done anything like this before but this method should work.

Make all the raycasts have a range of about 1 - 2.5 studs.
Optional: Make the bot look at the target.
Do three raycasts from the eye point. (even two might work if its laggy)
If all three collide, turn 180 around. Do three more raycasts. If all 6 have collided, turn 180 degrees again and try to jump in the first three collided raycast directions, do raycasts again, if collided turn around and try and jump in the second 3 raycasts directions, if collided then the bot assumes defeat and pauses for about 10 seconds or so and tries again I guess.
If less than three collide, rotate the bot negatively by the summed true direction of all collided raycasts (eg. if you fired at -30, 0 and 30 and -30 and 0 collided then you would rotate negatively by -30 degrees)
Walk forward 1 - 2.5 studs.
Rinse and repeat.

Ipquarx:

sounds like its possible. but, there seems to be 1 problem with destiny's solution, that is that it goes in the first direction that is open. givin the right (or wrong) combination of directions, it may just loop forever. and also, it seems like that isnt pathfinding, its trying every possible direction until you finally get it righ, basically a brute-force attack.

Chrono:


--- Quote from: Ipquarx on August 11, 2011, 04:33:49 PM ---sounds like its possible. but, there seems to be 1 problem with destiny's solution, that is that it goes in the first direction that is open. givin the right (or wrong) combination of directions, it may just loop forever. and also, it seems like that isnt pathfinding, its trying every possible direction until you finally get it righ, basically a brute-force attack.

--- End quote ---
Like Clockturns.
<makes waypoint 1, 2, 3, 4
"bot find something"
24242424242424242424242424242 424

Pages: << < (2/4) > >>

Go to full version