@Lorgan:
I don't have any experience, but I know the theory:
Though since you already coded stuff, you probably know this :/
I can't really help more, I'd need to sit and think for a while too.
Sorry.
Good luck.
PS: What are you working on?
No, all it does is spamming objects in all directions and those objects keep looping until they hit a wall and then create new objects in the free directions and it keeps doing that until it finds the target. (very shitty in other words)
I'll read that wikipedia thing later today, i don't feel like reading it now.
Actually, the images pretty much sum it up.
There's another version of that algorithm that's a bit faster, but also a bit more complicated.
Well, basically:
All the objects must have an int "distance" and two arrays: an "xArray" and a "yArray".
with path objects:
1. Check whether you are at the destination position; if yes goto 7. (see below), else continue
2. Set: "xArray[distance] = x; yArray[distance] = y"
3. Create objects everywhere around you where there is no other path object or obstacle
4. In all objects that you created, set their distance to yours+1
5. Copy your entire xArray and yArray into them
6. You are done. instance_destroy()
7. (You are at the destination) Return xArray and yArray to the character/AI; also return distance
The AI then has a nice set of instructions; next frame it's x=xArray[1], y=yArray[2]; then 2nd frame: x=xArray[2], y=yArray[2]; etc...
You get what I mean?
This code is probably laggy as hell, but it should work. If you can figure out a way to do this without involving objects, the lag will probably get cut down immensely.