Thread: Adding Hyperion Pathfinding to Elvarg

Results 1 to 4 of 4
  1. #1 Adding Hyperion Pathfinding to Elvarg 
    Registered Member
    Join Date
    Jul 2017
    Posts
    57
    Thanks given
    24
    Thanks received
    10
    Rep Power
    14
    I'm trying to add Hyperion's Dumb Pathfinding for npc combat following to Elvarg and I'm running into issues. One of the main problems I have right now is that the NPCs are moonwalking backwards sometimes off to infinity trying to reach my character and then sometimes they will walk backwards dance around and then find the correct path to my character, all the while *clipping* through things.

    The reason I'm trying to implement this system is because right now Elvarg's standard pathfinding doesn't account for the size of the npc when creating the path, so larger npcs will appear to clip through walls and objects to get to the player (they don't actually noclip, they just appear to because of the size of the npc following the standard path an npc would walk if they were a size 1 npc that by default will find the outside border of objects to walk along.

    Here is the code in my combat routine, all of the code will be at the bottom of the post in [ CODE ] blocks.



    Here are some images of how the npcs behave with this code.




    The server debug messages come up with this when the npc runs around.
    Code:
    p: [email protected]
    srcX: 2 srcY: 3
    dstX: 2 dstY: 2
    stepX: 2 stepY: 2
    Also when printing the "newPos" position that they are trying to walk to it comes out as:

    Movement position: Position values: [x, y, z] - [6237, 7031, 0].


    When the position my character ingame is that they need to reach would be:
    3119, 3516

    Even when I divide the positions X and Y coords by 2 and use that path instead, they have problems coming to my coordinate and will dance around.

    The classes I am using to try and make this happen.

    MovementQueue.java - [Only registered and activated users can see links. ]
    DumbPathFinder.java - [Only registered and activated users can see links. ]
    Tile.java - [Only registered and activated users can see links. ]
    TileMapBuilder.java - [Only registered and activated users can see links. ]
    Path.java - [Only registered and activated users can see links. ]
    PathFinder.java - [Only registered and activated users can see links. ]
    Point.java - [Only registered and activated users can see links. ]
    TileMap.java - [Only registered and activated users can see links. ]


    I don't expect this to be a really easy task to do, but I'm trying my best to figure it out and implement it. I know TileMapBuilder.java has some code commented out because I can't find the equivalent in Elvarg's region classes, and I tried referencing Hyperion to add the code but I wasn't able to get it to work.

    Can someone tell me if this can even be done to fit my needs? To fix the clip sizes for npcs, and to eventually add the dumb pathfinding to get them stuck behind objects like on Hyperion and the actual RS.


    Kind regards.
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,985
    Thanks given
    257
    Thanks received
    470
    Rep Power
    536
    Don't wanna be rude but nobody is gonna spoonfeed.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Jul 2017
    Posts
    57
    Thanks given
    24
    Thanks received
    10
    Rep Power
    14
    Quote Originally Posted by Nighel View Post
    Don't wanna be rude but nobody is gonna spoonfeed.

    I don't want to be spoonfed honestly, It's just I'm having a hard time figuring out pathing. If someone is aware and familiar with elvarg and could just let me know if I'm wasting my time trying to add another source's pathfinding if the code exists inside of elvarg but just isn't implemented correctly or fully.
    Reply With Quote  
     

  5. #4  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,985
    Thanks given
    257
    Thanks received
    470
    Rep Power
    536
    Quote Originally Posted by HeyPewds View Post
    I don't want to be spoonfed honestly, It's just I'm having a hard time figuring out pathing. If someone is aware and familiar with elvarg and could just let me know if I'm wasting my time trying to add another source's pathfinding if the code exists inside of elvarg but just isn't implemented correctly or fully.
    Am sure it can be done with the code thats in elvarg now, if i remb correctly the pathfinding of elvarg was weird in general, npcs walking around objects and stuff.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 14
    Last Post: 03-14-2018, 05:28 AM
  2. Adding Attackable NPCs to Hyperion 474
    By Ormond32176 in forum Help
    Replies: 1
    Last Post: 02-04-2014, 07:36 PM
  3. Replies: 3
    Last Post: 01-04-2012, 07:03 AM
  4. Adding npc's to hyperion... client error
    By windows phone in forum Help
    Replies: 9
    Last Post: 10-05-2011, 02:43 AM
  5. Adding npc's to hyperion.
    By windows phone in forum Help
    Replies: 0
    Last Post: 09-29-2011, 03:06 AM
Tags for this Thread

View Tag Cloud

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