Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-24-2003, 04:38 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
Pathfinding

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

Anyone have any tutorials or anything?
__________________
Reply With Quote
  #2  
Old 12-24-2003, 07:27 AM
DIABLO2099 DIABLO2099 is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 290
DIABLO2099 is on a distinguished road
Search the forum database for pathfinding, there were a number of discussions about it.
__________________
-Former UnholyNation Server Manager.

Call me Xecutor.
Reply With Quote
  #3  
Old 12-24-2003, 04:22 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
I think Giltwist already made a script about it once, just search.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #4  
Old 12-24-2003, 04:58 PM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
giltwists script is very laggy though.
__________________
Reply With Quote
  #5  
Old 12-24-2003, 07:38 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
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*.
__________________
new account: Trevor
Reply With Quote
  #6  
Old 12-28-2003, 03:07 AM
MysticHaste MysticHaste is offline
Registered User
Join Date: Dec 2003
Location: Australia
Posts: 109
MysticHaste is on a distinguished road
Send a message via AIM to MysticHaste
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.)
__________________
spread the herat <3

Quote:
Originally posted by unixmad
Still not sure if it was not someone smoking to mush
Reply With Quote
  #7  
Old 12-28-2003, 04:43 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
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
__________________
No longer a Advertisement Goat
Reply With Quote
  #8  
Old 12-28-2003, 05:48 AM
Thought Thought is offline
PipBoy Extraordinaire!
Thought's Avatar
Join Date: Nov 2001
Location: Long Beach, California.
Posts: 692
Thought is on a distinguished road
A* pathfinding is very inefficient in GraalScript :o

*pokes Stefan*
__________________
Rick ([email protected])
#gscript on FreeNode (#gscript Guild, #gscript Information)
Graal User Statistics

I am now using my new account, Rick.
Reply With Quote
  #9  
Old 12-28-2003, 07:26 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #10  
Old 12-28-2003, 08:17 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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
Reply With Quote
  #11  
Old 12-28-2003, 08:50 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
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...
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #12  
Old 12-28-2003, 11:45 AM
D1ce2 D1ce2 is offline
Registered User
Join Date: Dec 2003
Location: United Kingdom
Posts: 446
D1ce2 is on a distinguished road
Send a message via AIM to D1ce2 Send a message via Yahoo to D1ce2
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
__________________

The time is coming
Reply With Quote
  #13  
Old 12-28-2003, 04:09 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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. :-/
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #14  
Old 12-28-2003, 08:28 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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? :-/
Reply With Quote
  #15  
Old 12-28-2003, 10:35 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
This is the one *I think* Kai made
Attached Files
File Type: zip pathfind.zip (2.6 KB, 172 views)
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #16  
Old 12-29-2003, 01:54 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #17  
Old 12-29-2003, 06:29 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
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
__________________

Last edited by Darlene159; 06-30-2007 at 04:25 AM..
Reply With Quote
  #18  
Old 12-29-2003, 06:42 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally posted by adam


I'm flattered you think that's his,

But i'ts mine.
Whoops! Well we all make mistakes, Lol.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #19  
Old 01-05-2004, 12:44 AM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
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
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #20  
Old 01-05-2004, 01:03 AM
marcoR marcoR is offline
Registered User
Join Date: Jul 2003
Posts: 1,349
marcoR is on a distinguished road
Let's see more of this Pathfinding!
__________________
If this is your account, contact me.
- loriel
email, jabber: [email protected]
icq: 67530805
aim: lorielvictrix
Reply With Quote
  #21  
Old 01-05-2004, 05:05 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Chad had a very good pathfinder.

Link: http://forums.graal2001.com/forums/s...r=2#post853953
Reply With Quote
  #22  
Old 01-05-2004, 05:24 AM
Nappa Nappa is offline
The Great Nappa
Nappa's Avatar
Join Date: Sep 2003
Location: Florida
Posts: 1,911
Nappa is on a distinguished road
Send a message via AIM to Nappa
I dont think this one worked so well..
Attached Thumbnails
Click image for larger version

Name:	notsowell.png
Views:	121
Size:	33.0 KB
ID:	26919  
__________________
Reply With Quote
  #23  
Old 01-05-2004, 06:03 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Nappa
I dont think this one worked so well..
Neither did I.
It sucked.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #24  
Old 01-05-2004, 08:37 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
chads is fecking awesome
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:59 AM.


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