Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-18-2003, 11:53 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Gil* Pathfinding

Well, I figure I might as well give this a go. This is much faster than soul's at this point. Taking no more than 10 seconds. This NPC is not a cart of premade code, nor a redo of Soul's. I made this from scratch based upon the description of the process.

Now, as you may or may not know, I don't just show off finished scripts, I like to leave bugs in so that other people don't just slap it onto their playerworld. In this case, I think that there is a slight overflow problem with the string arrays, as they do get rather full rather fast. If Stefan wanted to double or more the array caps, I believe it would make it a more useful script. However, I am not about to let onto my plans for cleaning it up.

Without futher ado, the level.
Attached Files
File Type: nw pathfind2.nw (13.0 KB, 228 views)
__________________


Help me keep scripting
Reply With Quote
  #2  
Old 08-19-2003, 01:02 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
hehe, nice name, pretty easy to make it freeze up Graal though, no?
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #3  
Old 08-19-2003, 01:05 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Read the caveat in my original post dude
__________________


Help me keep scripting
Reply With Quote
  #4  
Old 08-19-2003, 01:38 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Not bad =)
I will take a closer look later, seems to work pretty good. Only one big flaw I saw, if it's not possible to get to that location, it locks up the game =p
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #5  
Old 08-19-2003, 05:06 PM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
The Bam should be SHAZAM! Anyways, thats pretty awesome.
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
Reply With Quote
  #6  
Old 08-19-2003, 05:26 PM
Questa Questa is offline
Back to the Beat
Join Date: Jan 2002
Location: USA
Posts: 1,230
Questa is on a distinguished road
Send a message via AIM to Questa
That's really cool, you should add a failsafe so that if you can't get to the X then the guy says so. Otherwise it just freezes.
__________________
Reply With Quote
  #7  
Old 08-19-2003, 08:05 PM
Snakeandy7 Snakeandy7 is offline
"Member ID=2610"
Snakeandy7's Avatar
Join Date: Mar 2003
Posts: 987
Snakeandy7 is on a distinguished road
Lol, add more bushes > graal crash !
__________________
"Freedom is best I tell thee
of all things to be won
then never live within the bond
of slavery my son".


Reply With Quote
  #8  
Old 08-20-2003, 01:04 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Graal does not have a whole lot of computing power, unfortunately.
__________________


Help me keep scripting
Reply With Quote
  #9  
Old 08-20-2003, 06:35 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
he didnt like my maze i made for him
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #10  
Old 08-20-2003, 06:49 AM
marcoR marcoR is offline
Registered User
Join Date: Jul 2003
Posts: 1,349
marcoR is on a distinguished road
he's a very selfish NPC.
__________________
If this is your account, contact me.
- loriel
email, jabber: [email protected]
icq: 67530805
aim: lorielvictrix
Reply With Quote
  #11  
Old 08-20-2003, 07:52 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
I dont think it is very cost-effective to impliment an A* algorithm for pathfinding via scripts. Never-the-less, good work.
__________________

subliminal message: 1+1=3
Reply With Quote
  #12  
Old 08-20-2003, 07:58 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
I added a couple more tiles.. its been way more than 10 secs so far, hes still "thinking" and graal is in a nicely frozen state.
__________________

Reply With Quote
  #13  
Old 08-20-2003, 08:11 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Agreed, A* is just too powerful for Graal's engine. However, this is the first scripting challenge I have had in a while. Not many things force me to go out and learn new skills.

As for the path, it isn't exactly the length of the path, its the complexity. When it gets too complex, then it overloads Graal, but it can easily go cross screen if it doesn't need to do anyything tricky
__________________


Help me keep scripting
Reply With Quote
  #14  
Old 08-20-2003, 09:02 AM
superb superb is offline
Sir Pickles at one time
superb's Avatar
Join Date: Dec 2002
Location: Houston, TX
Posts: 3,263
superb is on a distinguished road
Quote:
Originally posted by TribulationStaff
Agreed, A* is just too powerful for Graal's engine. However, this is the first scripting challenge I have had in a while. Not many things force me to go out and learn new skills.

As for the path, it isn't exactly the length of the path, its the complexity. When it gets too complex, then it overloads Graal, but it can easily go cross screen if it doesn't need to do anyything tricky
Yeah and what's strange is graal often will take 100% of the cpu time. Stefan should really focus on optimization in the C++ rewrite if he hasn't been already.
__________________
FEAR THE LLAMA

-Pickles
Reply With Quote
  #15  
Old 08-21-2003, 02:53 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Quote:
Originally posted by superb


Yeah and what's strange is graal often will take 100% of the cpu time. Stefan should really focus on optimization in the C++ rewrite if he hasn't been already.
you forget, graal isnt like window message-based apps that wait untill it gets input from the user.. it is constantly updating the game state regaurdless of user input. Thats how games are. I'm sure you'll find that most, if not all, games that you play will take up ~99% of the CPU time.
__________________

subliminal message: 1+1=3
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:06 PM.


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