-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|671|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> AI and Movement


 
Pakz
Created : 06 January 2018
Edited : 06 January 2018
Language : Monkey2

Brute Force Pathfinding

Create a path by doing all combinations(grow number)

Emscripten demo

Latest Update

I made this pathfinder to see if it was simple to do.

What it does is add up a string of numbers(directions). In a function I add up one movement possibility to the string. So it starts with a string size of 1. The value there is 0(up) to 3(left) by adding up one movement you will find the shortest path to the destination. Counting your way there.

It is super slow on larger maps, but on smaller maps a path is found in a instant.

 

Comments