![]() |
Pathfinding
Whats a good way to go about adding pathfinding to graal?
Anyone have any tutorials or anything? |
Search the forum database for pathfinding, there were a number of discussions about it.
|
I think Giltwist already made a script about it once, just search.
|
giltwists script is very laggy though.
|
the best way is to read up on a* pathfinding and base your own pathfinding algorithm on it. if you can't think of a good way to do it on your own then reading up on a* will help you tremendously; however, i wouldn't suggest directly implementing a*.
|
I'm not sure if its worth the effort for graal really.
The easiest way i can see is by making waypoints for npcs to follow along the paths. (For world travel I mean. Just a few points in every level for the NPC to goto as to avoid obsticles.) (Going to adding, going back subtracting) Have the npc look for next point, goto it, goto the next etc. To have REAL pathfinding requires too much processer power. But Please do prove me wrong, I'd love to see someone release a real time pathfinding npc, everything I've seen has been terribly stupid (*I think it was rogueshadow that made the ball that just dragged itself left, as soon as it needed to go right it would just sit on the wall) Or takes a long time to find the path then starts. (Though it worked beautifully when it did start (several minutes later)) But in small areas (like walking to a bakery in a town or a blacksmith) You could always just make pre-scripted walking paths.. (Like The 2k1 Police Officers.. and the fishing guy etc.) |
Quote:
However i remember that Kaimetsu had a good theory about pathfinding, but all his posts were pruned, if i remember correctly :\ |
A* pathfinding is very inefficient in GraalScript :o
*pokes Stefan* |
Quote:
I hadn't even tried to research it. Wow you have a great memory, becouse I did that a very long time ago. I have made better one's since then. :) The best pathfinding from kaimetsu would be extremely laggy if it found it's way to open space. But if you put it in a mace, it would always find it's way right away. It was great. Well, the one I saw anyway. |
Quote:
|
mine took very little time under normal conditions (i.e. not in a maze) otherwise still not very long, unless you have a crap computer like mine is becoming...
|
Do you mean following a specific tile?.. Isn't the command similar to this :
NPC Code: Or add a variable to it for easier use.. I think this is wrong but.. o-well :( |
Quote:
Believe it or not me and kai used to talk a lot. And exchange scripts. Even work on little things together. :-/ |
Quote:
|
1 Attachment(s)
This is the one *I think* Kai made
|
All times are GMT +2. The time now is 05:54 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.