Point'n Click 2D pathFinding

Share your advanced PureBasic knowledge/code with the community.
benubi
Enthusiast
Enthusiast
Posts: 219
Joined: Tue Mar 29, 2005 4:01 pm

Re: Point'n Click 2D pathFinding

Post by benubi »

Hello,

this looks impressive, good job!

I believe the point is stuck because it lands on the line itself and there is a collision 360° no matter in which direction you "shoot". I'd try to keep the "dot" at a minimum distance from the collider lines (dot radius + 0.00000000001). I haven't looked through the entire code, I may not understand it either but I believe this could be the issue. :wink:
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Point'n Click 2D pathFinding

Post by IceSoft »

thyphoon wrote: Sat Aug 16, 2025 6:03 pm Thans yes ... Not easy ... but i search how to correct it 😉
For a better debuging maybe it is usefull you can add the start-/end points as variables (not mousepointer position).
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 351
Joined: Sat Dec 25, 2004 2:37 pm

Re: Point'n Click 2D pathFinding

Post by thyphoon »

benubi wrote: Tue Aug 19, 2025 10:22 pm Hello,

this looks impressive, good job!

I believe the point is stuck because it lands on the line itself and there is a collision 360° no matter in which direction you "shoot". I'd try to keep the "dot" at a minimum distance from the collider lines (dot radius + 0.00000000001). I haven't looked through the entire code, I may not understand it either but I believe this could be the issue. :wink:
Yes, I agree with your analysis. As soon as I have a little time, I'll dive back into it to try to resolve this last point.
IceSoft wrote: Wed Aug 20, 2025 6:00 am For a better debuging maybe it is usefull you can add the start-/end points as variables (not mousepointer position).
Yes, I simplified my code a bit to put it here. Because I have somewhat large logs that allow me to analyze each step of the path search.
Post Reply