I've been racking my brain (which isn't helping much.. I keep feeling like i'm almost at someplace but then failing) trying to sort out a basic pathfinding system for a non-tile based Adventure game system. The ol' point and click.

I've tried a few systems I could find and tried converting code into a usable form and kept rolling blanks.

What I got right now is this, the playing 'walkable' field is defined as a square. Inside that, I have created 4 points making another square. this draws as a solid square (Block). the player starts at one place (top left) and when you click on someplace in the playing field, a point is created at that mouse position. The code then draws a straight between the two points and then checks with the points on the block to see if the line created from current position to target position intersects with any of the lines of the block (sides). If I does, it creates a new point at that intersection line and tells it to move to the next point around the block and then uses that as a new starting point to create another line to the target, and so on, until it can get to the target. It's not the most efficient way, and I want to find a method to speed it up (like it would make more logical sense to walk directly to the corner point instead of walking to the intersection point and then along to the corner) but i'm more keen on getting it working first.

anyway, it kinda works, though problems with it like it has to take a longer route (can't loop backwards through an array of points) also, adding a second block throws it out of the window as it'll keep looping around the first block trying to find a way to walk around that and around the second to get to a target.. there is also a big problem with corners and such like intersection.. I'm willing to upload a copy of my source code if wanted..

anyway.. Does anyone know a good system or have a link to a good guide or something on a decent pathfinding for mouse click movements? I did wondered about trying to adapt a tile based system but it didn't work out well.. also wondered about node points spread out around the maps so it finds the closest node point and just plans a path to that, and from that to the clicked location but it doesn't seam that good a system to me..