Astar Bug..
Ariesnl

Hey everyone,

I thought I finally managed to implement astar..
I first tried it with a simple map consisting of vectors of vectors, containing tiles
now for performance I switched to vectors containing pointers to objects..
But now my algorithm seems to make a lot of mistakes..

and I have no idea why... :-/

Anyone want to help ?

Edgar Reynaldo

I got your program to build and run. What am I looking at with the red squares, black squares, and green dots?

I'll help you debug if you help me understand where to look.

Ariesnl

the red squares are not passable
the black squares are passable
the green dots( now white circles) are the path from 2,2 to 50,50

I think I found the bug, for some reason x and y are reversed..

try it .. now with n you can get a new random path ( all starting from 2,2)

thx for looking at it ;-)

if you have any suggestions for improvement, please do so

Edgar Reynaldo

The screen starts blank, I press n and a path comes up. Pressing n again doesn't really do anything, and it seems to hang up and not want to close.

Thread #617867. Printed from Allegro.cc