I have problems, specifically porting from this.
I'm not going to say I hate pathfinding... But I hate pathfinding. I either do not have the brain capacity to figure out how to do this, but I also seem to wonder how a table have trouble being indexed a -1, -1 but no problem with -1, 3. Infact I'm also baffled why it's even going into the negatives at this point.
Now I remember why I took a long break from Löve2D. Nothing conventional and productive seems to work for me.
pathfinding -_-
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
pathfinding -_-
- Attachments
-
- unnamed.love
- (7.74 KiB) Downloaded 80 times
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
Okay! Scratch that! more immediate problem here! (I fixed the last one)
I think I managed to find a great pattern maker with nodes! But I'm pretty sure this isn't the shortest path...
So... um... yeah...
Yet I fixed it, but it's still quite Quarky. (I made it draw rectangles to make it easier to look at)
Looks like it thinks in some cases that the gCost for a diagonal is less than the gCost for an orthogonal.
I think I managed to find a great pattern maker with nodes! But I'm pretty sure this isn't the shortest path...
So... um... yeah...
Yet I fixed it, but it's still quite Quarky. (I made it draw rectangles to make it easier to look at)
Looks like it thinks in some cases that the gCost for a diagonal is less than the gCost for an orthogonal.
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
Nvm I got it...
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: pathfinding -_-
Posting on forums is like casting +INT spell on yourself
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
Nothing anymore. I got it to be fixed. It... had a weird fix... By not making any sense. I just trial and errored until it worked -_-.
If you want to see it now, here it is. And if you're looking for distV function, it's in the init file, and it just looks for the distance between two objects who have x and y indexes.
Left click (Hold) to destroy / create walls. Right click to find a path.
Although I am unsure... But it seems like it's checking more tiles that it needs to be.
If you want to see it now, here it is. And if you're looking for distV function, it's in the init file, and it just looks for the distance between two objects who have x and y indexes.
Left click (Hold) to destroy / create walls. Right click to find a path.
Although I am unsure... But it seems like it's checking more tiles that it needs to be.
haha yeah, I guess so. I think I've done it a couple times where I solved my own problems.pacman wrote:Posting on forums is like casting +INT spell on yourself
- Attachments
-
- unnamed.love
- (9.25 KiB) Downloaded 79 times
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
I had it all down, then I decided to make the code make sense, and I broke it -_- It's suppose to return a table if It couldn't find a path. Yet it's getting caught in an infinite loop if you box in the player or the destination. And sometimes, just sometimes It gets thrown into an infinite loops for no apparent reason that I can find.
- Attachments
-
- unnamed.love
- (202.38 KiB) Downloaded 78 times
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
Yeah this seems to not be one of those cases where posting adds a +int. I'm still having trouble.
Yup, Still having trouble. It's difficult to figure this out.
I thought it might have been some type of weird conflict with the heuristic. But that was wrong. I do know it's a problem with the pathfinding though. I was thinking of putting it into a thread. Although, Coroutines don't seem to work, and it seems love's threads are my best bet. Too bad there's not too much documentation on them. But if I got threads to work, then I could communicate between both threads and make the pathfinding thread have a .1 sleep time so I can draw the open and closed lists and maybe see what the problem is.
Anybody?
Yup, Still having trouble. It's difficult to figure this out.
I thought it might have been some type of weird conflict with the heuristic. But that was wrong. I do know it's a problem with the pathfinding though. I was thinking of putting it into a thread. Although, Coroutines don't seem to work, and it seems love's threads are my best bet. Too bad there's not too much documentation on them. But if I got threads to work, then I could communicate between both threads and make the pathfinding thread have a .1 sleep time so I can draw the open and closed lists and maybe see what the problem is.
Anybody?
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: pathfinding -_-
This will be the last time I bump this, to avoid annoying people.
Edit: Fixed it. By looking at the older code. And making changes that didn't make sense and it works... Yeehaw...
Edit: Fixed it. By looking at the older code. And making changes that didn't make sense and it works... Yeehaw...
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests