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, 166 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
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 05:34 PM.


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