Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-29-2001, 02:42 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Multitasking

This one's more so I can get a concensus than anything else; what do you guys think about me making a pathing NPCW? It wouldn't be TOO difficult, use the string parsing commands to figure out how many levels away your destination is, and use onwall to find a way from one side of the level to the other...the current world isn't TOO complicated, the only new command I'd need is for onwall() to work like tiles(), so you can feed in a negative value or a >64 value and it'll check the next level over, then a simple bidirectional search and a few static destinations, wouldn't be too difficult. Good practice too. Just take more time than I have, but eh.

The upshot of this is that your Graalian would do the walking for you, Starcraft style. You set your destination to Bomboria Square, and it walks while you talk to your friends, etc.
Maybe it'd work with the go-karts? Press A for Autopilot? ^_^
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #2  
Old 10-29-2001, 03:31 AM
DoragonKoden_RC6 DoragonKoden_RC6 is offline
Registered User
Join Date: Oct 2001
Posts: 221
DoragonKoden_RC6 is on a distinguished road
Re: Multitasking

Quote:
Originally posted by Tyhm
This one's more so I can get a concensus than anything else; what do you guys think about me making a pathing NPCW? It wouldn't be TOO difficult, use the string parsing commands to figure out how many levels away your destination is, and use onwall to find a way from one side of the level to the other...the current world isn't TOO complicated, the only new command I'd need is for onwall() to work like tiles(), so you can feed in a negative value or a >64 value and it'll check the next level over, then a simple bidirectional search and a few static destinations, wouldn't be too difficult. Good practice too. Just take more time than I have, but eh.

The upshot of this is that your Graalian would do the walking for you, Starcraft style. You set your destination to Bomboria Square, and it walks while you talk to your friends, etc.
Maybe it'd work with the go-karts? Press A for Autopilot? ^_^
That's a neat idea, maybe they could set up a new command
to "read" the map based on how it is, ie, maplevel(x, y) could
return the level at that position on the map. Then you could
easily come up with the distance from yourself to that level.
Reply With Quote
  #3  
Old 10-29-2001, 07:54 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
It'd be really simple, that part.
You enter the Go-Kart, say Bombaria, hit A, and it goes.
What it does is it compares "Bombaria" to its database of waypoints, translates it to "a-6" or whatever, then uses the ASCII of the current level letter (say you're in g-2), a-g=1-7=-6, *64=384, -(x-targetx) for the exact...same for the y, and you'll have the exact coordinates relative to your current level to search for a path to.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #4  
Old 10-29-2001, 09:12 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Re: Re: Multitasking

Quote:
Originally posted by DoragonKoden_RC6


That's a neat idea, maybe they could set up a new command
to "read" the map based on how it is, ie, maplevel(x, y) could
return the level at that position on the map. Then you could
easily come up with the distance from yourself to that level.
There is something like onmapx(level) and onmapy(level) or so
Reply With Quote
  #5  
Old 10-29-2001, 09:31 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Thwarted again by my ignorance of the spiffy P2P commands! Darn!

I assume onmapx(level) and onmapy(level) returns the level's X and Y on the map? So onmapx(graalmap_a-1.nw) or whatever would return 1, and onmapy(graalmap_a-1.nw) would return 1, etc?

Of course, that part I can do anyway just with the level names, since G2K1 is so nicely arranged...it would only be the onwall(-384,-384) that I'd need to make this work really nicely! Otherwise I suppose I could just use an uninformed search strategy, have the player keep wandering in approximately the right direction.....
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #6  
Old 10-29-2001, 01:10 PM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
How about horses that go on a destinated path?

You can buy a ticket for, say, 3 gralats.
Reply With Quote
  #7  
Old 11-25-2001, 01:27 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
You done yet?

I wanna see
__________________
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
  #8  
Old 11-25-2001, 10:02 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
0.o.O

Slow down everything will be autopiolet else made not a horse but a Horse and cart 5g a graalian day that way its noo jsut a horse.
__________________
--Spark911
Reply With Quote
  #9  
Old 11-26-2001, 10:36 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
......rrriiiiiiiight

Haven't even started yet, really. Stupid finals.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 11-26-2001, 04:59 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 Tyhm
......rrriiiiiiiight

Haven't even started yet, really. Stupid finals.
Understood

*looks at time*

I decided not to sleep today.... too much to do

*is totally serious I am not sleeping....*

look it's 5 am already and I goto work at 11 am.
__________________
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
  #11  
Old 05-08-2002, 11:23 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
Im still waiting for this to get done Tyhm. You have some more finals?

__________________
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
  #12  
Old 05-08-2002, 09:06 PM
Frolic_RC2 Frolic_RC2 is offline
Banned
Join Date: Jan 2002
Posts: 960
Frolic_RC2 is on a distinguished road
Hmm...couldn't you use something like the A* pathfining technique?

Assign numbers from your current location to destination, all going fown one number. Destination is 8 tiles away, where you are would be 8, destination would be 0. From 8 you move to 7, things like that, and you could only move from a bigger number to smaller. And assign -1 to onwall...

I been meaning to try making something like that, never bothered though, mainly because I want a 2d array =P. I know it can be simulated, but it would be spiffy to have 2d arrays.
Reply With Quote
  #13  
Old 05-08-2002, 09:24 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 Frolic_RC2
Hmm...couldn't you use something like the A* pathfining technique?

Assign numbers from your current location to destination, all going fown one number. Destination is 8 tiles away, where you are would be 8, destination would be 0. From 8 you move to 7, things like that, and you could only move from a bigger number to smaller. And assign -1 to onwall...

I been meaning to try making something like that, never bothered though, mainly because I want a 2d array =P. I know it can be simulated, but it would be spiffy to have 2d arrays.

The pathfinder tyhm create will be able to track between many levels. not just within one level.

This one == hard to make if he has to go around a few levels to get to the one the player is in.
__________________
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 05-08-2002, 09:26 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Hmm this seems a little complex thym. You saying this will perfectly find a path? What if no path exsists. What if the path needs to go backwards before it goes forward. Its eems simple in concept but its almost crazy if you have too many walls.
__________________

subliminal message: 1+1=3
Reply With Quote
  #15  
Old 05-08-2002, 10:39 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Falcor
Hmm this seems a little complex thym. You saying this will perfectly find a path? What if no path exsists. What if the path needs to go backwards before it goes forward. Its eems simple in concept but its almost crazy if you have too many walls.
What if there were no path! or what if there was no logical links to het there...
It could be harder then you may think, plus people may set their destination and go afk...:-/
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #16  
Old 05-09-2002, 12:29 AM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Add a built in PK Sytem that kills anyone who touches your ass while your on Autopilot! Or if people come within 4graal people space of you lots of killer ants come out and eat the person who comes to you alive...
__________________
--Spark911
Reply With Quote
  #17  
Old 05-09-2002, 04:42 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
On NW I decided that a waypoint system would be the best way to do pathfinding. How else could you get the NPC to respect things like roads and whatever? So, in that case, you wouldn't even need onwall et al. And it'd be really easy to write an algorithm for it - I already wrote one for NW
__________________
Reply With Quote
  #18  
Old 05-09-2002, 06:02 AM
Frolic_RC2 Frolic_RC2 is offline
Banned
Join Date: Jan 2002
Posts: 960
Frolic_RC2 is on a distinguished road
Quote:
Originally posted by Kaimetsu
On NW I decided that a waypoint system would be the best way to do pathfinding. How else could you get the NPC to respect things like roads and whatever? So, in that case, you wouldn't even need onwall et al. And it'd be really easy to write an algorithm for it - I already wrote one for NW
Thats the second thing I would have said, way points...

But even then you need something like the A* Algorithm...what if something blocks the way to the next waypoint? You need to find an different way to then get to the waypoint.
Reply With Quote
  #19  
Old 05-09-2002, 06:16 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Frolic_RC2


Thats the second thing I would have said, way points...

But even then you need something like the A* Algorithm...what if something blocks the way to the next waypoint? You need to find an different way to then get to the waypoint.
You'd use A* either way. For waypoints OR tiles.
__________________
Reply With Quote
  #20  
Old 05-09-2002, 07:19 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
waypoints work. but it takes a lil time to put them on =\. If ther was a way to make it so you didnt have to have waypoints it would be cool.
__________________

subliminal message: 1+1=3
Reply With Quote
  #21  
Old 05-11-2002, 01:03 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
I finished my Java pather. Does a horrible awful disgusting painfully bad job of reducing its world to waypoints, then connecting them as necessary. It's somewhere like http://www.iub.edu/~roboclub/ or something - a simple best-first search, removing expanded waypoints and building a list of possible paths, works really well. Might be tricky in a language without vectors - you'd have a finite number of possible paths and a finite path length - but doable.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #22  
Old 05-11-2002, 01:12 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Tyhm
Might be tricky in a language without vectors - you'd have a finite number of possible paths and a finite path length - but doable.
I already made one. It's actually pretty easy, and we can make our own thing to do the same thing as Vectors if we want. It's not like it's a primitive class, they still just throw numbers around. The fact that we can redimension GScript arrays without losing the contained data makes it a cinch.
__________________
Reply With Quote
  #23  
Old 05-17-2002, 01:01 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 Kaimetsu


I already made one. It's actually pretty easy, and we can make our own thing to do the same thing as Vectors if we want. It's not like it's a primitive class, they still just throw numbers around. The fact that we can redimension GScript arrays without losing the contained data makes it a cinch.
Ok pathfinding script is/was great.

But could we make a pathfinder that isn't all-knowing?

He should be able to find his way and only know what he can see with his two eye's. Your pathfinding script finds a route. Then tells the baddy specifically where to go. He should have to do some searching to find the path. ... Intelligent searching hehe.


Baddy: "I know I saw that player go this way..."
Baddy: "Oh there are lot's of twists and turns here..."
Baddy: "Maybe he went this way. I'll go look"
Baddy: "Whoops dead end I better go back and go that other way."
Baddy: "Hmm... another dead end. I better go back again"
Baddy: "Whoops almost went down the path I already checked, I had better be more careful."
Baddy: "Aha.. there is an exit here. The player must be here!"


I know it's silly =)
__________________
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 05-17-2002, 03:06 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by adam


Ok pathfinding script is/was great.

But could we make a pathfinder that isn't all-knowing?

He should be able to find his way and only know what he can see with his two eye's. Your pathfinding script finds a route. Then tells the baddy specifically where to go. He should have to do some searching to find the path. ... Intelligent searching hehe.
Sure, it's doable. In fact, I was actually talking about my second pathfinding script, which wasn't the one I showed you. This second one would allow learning pretty easily
__________________
Reply With Quote
  #25  
Old 05-18-2002, 12:25 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 Kaimetsu


Sure, it's doable. In fact, I was actually talking about my second pathfinding script, which wasn't the one I showed you. This second one would allow learning pretty easily



I lost the other script u showed me when I built my new computer. The backup disk was bad.
__________________
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
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 04:53 PM.


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