Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Pathfinding (https://forums.graalonline.com/forums/showthread.php?t=49870)

Kadar 12-24-2003 04:38 AM

Pathfinding
 
Whats a good way to go about adding pathfinding to graal?

Anyone have any tutorials or anything?

DIABLO2099 12-24-2003 07:27 AM

Search the forum database for pathfinding, there were a number of discussions about it.

osrs 12-24-2003 04:22 PM

I think Giltwist already made a script about it once, just search.

Hevaricubed 12-24-2003 04:58 PM

giltwists script is very laggy though.

tlf288 12-24-2003 07:38 PM

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*.

MysticHaste 12-28-2003 03:07 AM

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.)

Blue_Dragn 12-28-2003 04:43 AM

Quote:

Originally posted by MysticHaste
I'm not sure if its worth the effort for graal really.
Its not

However i remember that Kaimetsu had a good theory about pathfinding, but all his posts were pruned, if i remember correctly :\

Thought 12-28-2003 05:48 AM

A* pathfinding is very inefficient in GraalScript :o

*pokes Stefan*

adam 12-28-2003 07:26 AM

Quote:

Originally posted by MysticHaste
(*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)
Haha, yeah that was horrible. :)
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.

Python523 12-28-2003 08:17 AM

Quote:

Originally posted by adam


Haha, yeah that was horrible. :)
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.

Kai never posted a pathfinding script I think, plus the one he did and didn't post (at least I think he did) wouldn't be laggy at all, his was more or less a node system

Dach 12-28-2003 08:50 AM

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...

D1ce2 12-28-2003 11:45 AM

Do you mean following a specific tile?.. Isn't the command similar to this :
NPC Code:

if(tiles[playerx+1,playery-1) == tile number 1 || tile number 2 || etc)){
//Do this..
}


Or add a variable to it for easier use..
I think this is wrong but.. o-well :(

adam 12-28-2003 04:09 PM

Quote:

Originally posted by Python523


Kai never posted a pathfinding script I think, plus the one he did and didn't post (at least I think he did) wouldn't be laggy at all, his was more or less a node system

I guess he never posted the one i'm talking about.
Believe it or not me and kai used to talk a lot. And exchange scripts. Even work on little things together. :-/

Python523 12-28-2003 08:28 PM

Quote:

Originally posted by adam


I guess he never posted the one i'm talking about.
Believe it or not me and kai used to talk a lot. And exchange scripts. Even work on little things together. :-/

I never said you didn't, why are you being so defensive about such a trivial thing? :-/

ForgottenLegacy 12-28-2003 10:35 PM

1 Attachment(s)
This is the one *I think* Kai made

adam 12-29-2003 01:54 AM

Quote:

Originally posted by ForgottenLegacy
This is the one *I think* Kai made
I'm flattered you think that's his,

But i'ts mine. :)

Kadar 12-29-2003 06:29 AM

Thanks,
Ill probably make it use nodes/points to find its way around,
It would be pretty hard though making points in every level.. but its worth it :)

I could probably implement som kind of AI too for the nodes, where if it is going to a location and its been there before it will use the path it took in the past..
So it would not take the time to find the closest point to move to, and make it less laggy and stuff.

Thanks though for the help ;)

Hey mystic can i get ur aim that you use i dont have it.. i have your old ones:\
Or just im me sometime

Peace

ForgottenLegacy 12-29-2003 06:42 AM

Quote:

Originally posted by adam


I'm flattered you think that's his,

But i'ts mine. :)

Whoops! Well we all make mistakes, Lol.

GoZelda 01-05-2004 12:44 AM

Quote:

Originally posted by Hevaricubed
giltwists script is very laggy though.
It would crash the computer if you closed the area it needed to go to :grin:

But Souldblade's one was lag doom. In an open area it took five minutes to get there, and it didn't went in a straight line XD

marcoR 01-05-2004 01:03 AM

Let's see more of this Pathfinding!

Riot 01-05-2004 05:05 AM

Chad had a very good pathfinder.

Link: http://forums.graal2001.com/forums/s...r=2#post853953

Nappa 01-05-2004 05:24 AM

1 Attachment(s)
I dont think this one worked so well..

adam 01-05-2004 06:03 AM

Quote:

Originally posted by Nappa
I dont think this one worked so well..
Neither did I.
It sucked. :(

wonderboysp2p 01-05-2004 08:37 AM

chads is fecking awesome


All times are GMT +2. The time now is 07:57 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.