The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TestRun for NPC navgation
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #11
RE: TestRun for NPC navgation
I have these settings, maybe anyone makes conflict? I may be wrong but i though it would be the same movement they do to 'chase' players but for long distances.

Code:
NPCAI=01|04|08|0200|0400
NPC_AI_PATH|NPC_AI_EXTRA|NPC_AI_ALWAYSINT|NPC_AI_MOVEOBSTACLES|NPC_AI_PERSISTENT​PATH

Experimental=01|080|0100|020000
DiagonalWalkCheck|NewPositionChecks|WalkCheck|FixCanSeeInClosedConts

AdvancedLos=01|02
09-19-2013 06:23 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #12
RE: TestRun for NPC navgation
With NPC_AI_PATH and NPC_AI_ALWAYSINT NPCs should chase you until the end of the universe(if the npc is fast enough), btw i still didn't test the persistent path instead Tongue
(This post was last modified: 09-19-2013 09:55 PM by darksun84.)
09-19-2013 09:55 PM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #13
RE: TestRun for NPC navgation
(09-18-2013 09:28 AM)Rattlehead Wrote:  well, one thing RunUO has that we dont, that we SHOULD have, are waypoint gems, no scripting required and they work (last time i checked 10 years ago) pretty well, i had one with 20 waypoints, all of which he flawlessly executed in a dungeon, so if the devs implemented something like this, we would be one step closer to having functionality on their level.

(09-18-2013 10:31 AM)Anarch Cassius Wrote:  I've seen a way point based caravan but then you just have a static route.

Ideally you'd have the waypoints form a nodemap and use an A* variant to navigate that. Possibly using square grid based A* for finer dynamic navigation at other times.

The question is how to do that most efficiently without bogging down the server.

RunUO's waypoints tells the npc where to go, and A* finds out how to get there. However, the npc does not need the waypoint to move, if they are following its master, the master will become the "waypoint". The A* also does not need waypoints, if you don't mind about the process usage, you can make the npc run from Britain to Minoc, however, the max distance of search is limited due high amount of processing required to find long paths
Waypoints were designed to be a simple predefined route. You can set a bunch of waypoints then point the spawner to the first, when the npc reach the last one, it will try to go back to home or wander or even go back to the first waypoint if it is pointed by the last one.

Callandor2k released a ML version of RunUO which implements the city guides. It contains every city pre-mapped; It does use the Djikstra algorithm to find the best(?) path between the current position and the destination using the internal map. It will create waypoints to make the npc follow them, and when the npc reach it, it will move the waypoint to the next vertex, so the npc will "never" achieve the waypoint until the destination is reached. You can also expand the vertex list and pre-map every world road, city, and dungeon, so the npc can go almost everywhere using the internal vertex map.

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
09-20-2013 07:48 AM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #14
RE: TestRun for NPC navgation
Quote:The A* also does not need waypoints, if you don't mind about the process usage, you can make the npc run from Britain to Minoc, however, the max distance of search is limited due high amount of processing required to find long paths
Waypoints were designed to be a simple predefined route.

See my idea is basically a parallel of Callandor2k's. Dijkstra's algorithm is just A* without heuristics, so it's literally the same thing.

The only question I see is...

Static: Make every waypoint have set paths with known distances.
Advantage: Speed
Disadvantage: Changes are a pain.

Dynamic: Periodically do a FORITEMS and measure distance to all current waypoints to get the list.
Advantage: Easy to change on the fly
Disadvantage: Periodic re-calculation required, including whether there actually IS a direct path between the waypoints or if that line would hit major obstacles.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
(This post was last modified: 10-06-2013 01:12 PM by Anarch Cassius.)
10-06-2013 01:10 PM
Find all posts by this user Like Post Quote this message in a reply
Jim
Apprentice
*

Posts: 28
Likes Given: 1
Likes Received: 12 in 4 posts
Joined: Jan 2015
Reputation: 0



Post: #15
RE: TestRun for NPC navgation
Does anyone have the codes of Dijkstra's algorithm in SPHERE language?
02-18-2015 10:29 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)