Results 1 to 13 of 13

Thread: [SPS]Advice needed

  1. #1
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default [SPS]Advice needed

    Hiya, so I have a problem that I can't seem to find a way to get around. It's a bit hard to explain so I'll use an image to aid the explanation.



    Let's assume I have a point array of all of those little green dots. Now, let the blue dot represent out player's location and the red dot represent the target coordinate we want to walk to. If possible, how might I go about making an SPS-walker that would form a path from our current location to any one of the points in the recorded array using only the points in that array? It should, obviously, also calculate the shorter route to get to the destination point.

    I was wondering about using 'TPABetweenPoints' with a super high Rand to make the points and check each of those if they match my previous recorded array.

    Coh3n, maybe you have some ideas here?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  2. #2
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Hiya, so I have a problem that I can't seem to find a way to get around. It's a bit hard to explain so I'll use an image to aid the explanation.



    Let's assume I have a point array of all of those little green dots. Now, let the blue dot represent out player's location and the red dot represent the target coordinate we want to walk to. If possible, how might I go about making an SPS-walker that would form a path from our current location to any one of the points in the recorded array using only the points in that array? It should, obviously, also calculate the shorter route to get to the destination point.

    I was wondering about using 'TPABetweenPoints' with a super high Rand to make the points and check each of those if they match my previous recorded array.

    Coh3n, maybe you have some ideas here?
    Once you have the points all listed you could getmyspspos then if your sps pos is between values, you add the sps points on to eachother to create the path on the fly. Use the X and Y values to decide what is the start point and which one you plan on clicking next. I suggest making something like 4 or 8 quadrants and creating what your position would be and based on which quadrant you are in choose the appropriate path.

    Making a picture to explain it now.

    Edit: Each line on the map represents an if/case statement

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Iunno.. If you actually have a TPA of all those green dots then why not use SPS_WindWalk?

    Maybe split the TPA into two parts. One for the top, one for the bottom and whichever is smaller, walk that one?
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Hiya, so I have a problem
    That's not your only problem...

    Anyways, but to answer your question with a question: if you already have the points in a TPA, why not just simply click those points and then calculate the relative distances before clicking the next? :s
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Daniel View Post
    That's not your only problem...

    Anyways, but to answer your question with a question: if you already have the points in a TPA, why not just simply click those points and then calculate the relative distances before clicking the next? :s
    That's what I started doing but I think what I'll do is calculate two distances; the nearest two points to the player and the distance from those two points to the destination point. Whichever of the two is closer to the destination will be the next point in the walking path. I'll just loop this until the destination is reached. Genius!

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Genius!
    I know
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    If you wanted to do this the way you first described just look up dijkstra or a* pattern searching.

  8. #8
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Thanks for the advice, after a couple of hours I got it running just how I want it. It works beautifully.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  9. #9
    Join Date
    Jan 2012
    Posts
    369
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    Nice lol abyss crafter

  10. #10
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Flight may I ask why a abyss runecrafter? when beta comes here runecrafting runes will be dead since spells use like 1 death each cast >.<. Or are you making it for the challenge :P

  11. #11
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Flight may I ask why a abyss runecrafter? when beta comes here runecrafting runes will be dead since spells use like 1 death each cast >.<. Or are you making it for the challenge :P
    Not necessarily. Even though spell costs are reduced, the demand for them will increase as magic will become much more popular (due to the lower cost and remade (balanced) combat magic). Also all non-combat spells, vengeance etc are going to remain popular and their costs are not altered.

  12. #12
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I suppose it's just always been a goal of mine. I hope that it doesn't go to waste in the end, I've been working pretty hard on this one.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  13. #13
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    I suppose it's just always been a goal of mine. I hope that it doesn't go to waste in the end, I've been working pretty hard on this one.
    Remind me of ZMI Extreme

Thread Information

Users Browsing this Thread

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

Posting Permissions

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