Page 1 of 13 12311 ... LastLast
Results 1 to 25 of 309

Thread: SRL Positioning System (OFFICIAL THREAD)

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default SRL Positioning System (OFFICIAL THREAD)

    SRL Positioning System
    Status: Working as of December 20th, 2012

    Introduction:

    SRL Positioning System (a.k.a. SPS) is a 100% color positioning system that allows for easy and accurate color walking. SPS was originally developed by marpis, and has since been developed by the SRL community. The original SPS thread can be found here, and the new SPS source can be found here.


    Table of Contents:

    • Introduction
    • Table of Contents
    • Features
    • Supported Maps/Surfaces
    • Tools/Scripting Aids
    • Download and Installation
    • Development
    • Testing
    • Adding SPS to a Script
    • Scripting Hints/Tips
    • SPS Global Variables
    • Credits
    • Conclusion


    Features:

    • 100% color.
    • Works without SMART.
    • It is very, very simple to use.
    • The mathematics behind SPS can be found here.


    Supported Maps/Surfaces:

    There are A LOT of supported maps. All maps can be found in the SPS/img/ directory, or are viewable online here.


    Tools/Scripting Aids:

    • SPS Pathmaker application developed by m34tcode. Download here.
    • Includes a tool to automatically create the RS surface world map (in SPS/tools/).
    • Automatic updater.


    Download & Installation:

    • Close any instances of Simba you have open.
    • SPS is included with the SRL updater, so if you've installed SRL, you should already have an SPS heading in your Simba. If you don't have this heading, follow this short tutorial.
    • To install manually, download SPS from here, and extract it to Simba/Includes/. Make sure you rename the folder to SPS.
    • Open the new SPS folder and copy the sps.dll file that's in SPS/plugins/.
    • Paste that file in Simba/Plugins/.
    • Done!


    Development:

    Since SPS is hosted on github, anyone can fork it, change whatever they want, and send a pull request. If you're interested in helping out, please post on this thread.


    Testing:

    MSI does and always will use SPS it's primary walking method. There are also test files included with the SPS repository if you want to test that way. They can be found in the SPS/test/ directory.


    Adding SPS to a Script:

    First thing you should do is download a SPS pathmaker tool. There are a few different versions out there, all of which will get the job done. It makes creating SPS paths very, very easy.



    • Load the SPS library and include sps.simba in your script:
      Simba Code:
      program spsTest;
      {$i srl/srl.simba}
      {$i sps/sps.simba} // has to be included after SRL
    • Call SPS_Setup (this needs to be called each time you want to change surfaces)
      Simba Code:
      procedure SPS_Setup(surface: integer; areas: TStringArray);

      • Surface: One of the supported surface constants:
        Progress Report:
        RUNESCAPE_OTHER
        RUNESCAPE_SURFACE
      • Areas: Go to your SPS/img/ folder and open the sub folder of the surface you're walking on.
      • Find the map pieces of where you're walking and add them to the array.
      • For example, the areas for Varrock east mine would just be ['12_7'], or the area for the Essence Mine would be ['essence_mine'].


    • NOTE: It is highly recommended that if you'll be walking close to the edge of an area, that you include the area beside the edge you'll be walking on. This ensures a more accurate calculation.

    • So, calling SPS_Setup should look something like this:
      Simba Code:
      SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);

      // or, for the Essence Mine...[/B][/COLOR]

      SPS_Setup(RUNESCAPE_OTHER, ['essence_mine']);
    • Create a path using the Pathmaker tool.
    • Call SPS_WalkPath or SPS_BlindWalk when you want the script to walk.
    • View the test file in the repository here.
    • IMORTANT: If you're changing surfaces (i.e. from Runescape surface to the Essence mine) you have to call SPS_Setup again!
    • If you want to call a procedure while the player is walking (i.e. antiban or antirandoms), you can do this:
      Simba Code:
      program new;
      {$i srl/srl.simba}
      {$i sps/sps.simba}

      procedure antiban();
      begin
      // your antiban code here[/B][/COLOR]
      end;

      begin
        activateClient();
        clearDebug();
        setupSRL();

        // so it will call the 'antiban' procedure while walking
        SRL_Procs[SRL_Antiban] := @antiban;

        SPS_Setup(RUNESCAPE_SURFACE, ['10_7', '11_7']);
        Writeln(toStr(SPS_WindWalk(point(4353, 3025))));
      end.


    Scripting Hints/Tips:

    If you're having a small problem getting SPS to work exactly like you want, these tips and hints may help you out.

    • SPS can be VERY slow if you have several SPS areas loaded at once. For this reason, you can split the maps up so only 1 or 2 are loaded at a time. Simply walk a few points in a path, then call SPS_Setup again.

      Example (keep in mind these are NOT actual points/areas; they're just used for the example):
      Simba Code:
      // if you want to walk from GE bank to VW bank to VE bank
      begin
        // setup SPS to walk to VW bank
        GEToVWB := [ Point(1234, 5678), Point(8765, 4321) ];
        SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
        SPS_WalkPath(GEToVWB);

        // setup SPS again to walk to VE bank
        VWBToVEB := [ Point(9876, 6789), Point(4321, 1234) ];
        SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
        SPS_WalkPath(VWBToVEB);
      end.
    • The same concept can be used to change maps. For example, if you're walking from Falador east bank into the Dwarven mines you can use code that looks something like this:
      Simba Code:
      begin
        FEBToLadders := [ Point(1234, 5678), Point(8765, 4321) ];
        SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
        SPS_WalkPath(FEBToLadders);

        LaddersToMine := [ Point(9876, 6789), Point(4321, 1234) ];
        SPS_Setup(RUNESCAPE_OTHER, ['dwarven_mine']);
        SPS_WalkPath(LaddersToMine);
      end.
    • If you're walking to a point that's near the edge of an SPS area, also include the adjacent area when you call SPS_Setup. This will significantly increase accuracy. For example, if you're walking to Varrock East Bank (from anywhere) you should include areas 11_7 and 12_7.

    • Using SPS_WalkPath will be slightly faster than using SPS_BlindWalk because SPS_GetMyPos is called more often. However, SPS_BlindWalk is more human like in my opinion because the walking path is randomly generated.


    SPS Global Variables:

    There are a few SPS global variables that can be set to customize how SPS works. Keep in mind that these variables should be set AFTER you call SPS_Setup.

    • SPS_Debug: boolean; Disabled by default. Setting to true will show SPS debugging in the Simba debug box.

    • SPS_MultiMouse: boolean; Enabled by default. This variable simulates human mouse clicking when walking the path. It will click the next point multiple times (randomly, of course).

    • SPS_Tolerance: extended; Set to 600 by default. The higher the number, the higher the tolerance when comparing minimap colors to SPS area colors.

    • SPS_MatchesPercent: extended; Set to 0.35 by default. SPS compares small boxes of the minimap compared to small boxes on the SPS areas. A percentage of matches is returned. This variable is the minimum matches. If this percent isn't reached, SPS_GetMyPos will return (-1, -1).

    • SPS_Accuracy: integer; Set to 4 by default. SPS areas and the minimap are split into boxes with side length of SPS_Accuracy. The smaller the number, the more boxes are created, and the more comparisons are made, making it more accurate. More comparisons take more time, so making this variable lower, will decrease the speed of SPS_GetMyPos; however, if you use SPS_BlinkWalk, it probably won't be noticeable.

      People have reported some areas not working very well for them. If this happens, I recommend setting SPS_Accuracy to 3.

    • SPS_AnyAngle: boolean; Set to false by default. Setting this to true will allow SPS to work at ANY compass angle.

    • SPS_ClickNorth: boolean; Set to false by default. Setting this to true will call SRL's ClickNorth to point the compass north, rather than rotating the camera.


    Credits:

    • marpis for the original SPS development.
    • Wizzup** and mastaraymond of helping with the plugin.
    • Smidqe for continually updating the world map and map pieces.
    • Dgby714 for some cleaning up and plugin optimization.
    • Nava2 for increasing the speed significantly.
    • mika for the Dominion Tower implementation.
    • Someone (please tell me who you are, I can't remember, sorry ) for the Runecrafting Altar maps.
    • Hero for most of the dungeon map.
    • J J and Ollybest for making SPS work at any compass angle.


    Conclusion:

    SPS has been included in MSI for a very long time now and it's proven to work quite well. It is a very easy way to include color walking in your scripts. It can also be used for player location. The possibilites are literally endless.

    Lastly, I want to say thank you to anyone who has contributed and to anyone who will contribute in the future. SPS is, without a doubt, the future of color walking.

    Cheers,
    Coh3n
    Last edited by Coh3n; 02-10-2013 at 03:34 AM.

  2. #2
    Join Date
    Jan 2007
    Location
    Stavanger, Norway
    Posts
    8,660
    Mentioned
    107 Post(s)
    Quoted
    255 Post(s)

    Default

    Is the map updated? If not it wont work in some areas

  3. #3
    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    98
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SPS sounds amazing!!! Developing a walking path is by far the hardest part of developing an all color script.
    ---- Kanah ----

    “If God did not exist then surely man would create him" - Voltiare

  4. #4
    Join Date
    Feb 2006
    Location
    Finland
    Posts
    3,001
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    Is the map updated? If not it wont work in some areas
    Yes it has.

    Quote Originally Posted by Smidqe View Post
    I've updated it and it's currently waiting to be pushed.

    Only thing that I found that wasn't working correctly was SPS_GetMyPos, it doesn't give accurate location. This will affect MSI.
    It works for me? I tested it in a few locations before making this thread.

    Quote Originally Posted by Home View Post
    Thank you.

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Quote Originally Posted by Smidqe View Post
    Huh? I tested with account in Varrock East bank, it gave locations that were far away
    You may have been using the SPS area that doesn't work. Look at the entire map, when you updated just the F2P area, it's like a lighter box around the whole F2P area. There are two areas with VEB, one worked for me, one didn't.

    We really need a script to just create the entire map. Would make that all easier.

  7. #7
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,849
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Prepare yourselves for an SPS worldwalking system in 3 weeks
    I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.

    Marpis will be back in the game! Temporarily, at least.

  8. #8
    Join Date
    Feb 2006
    Location
    Finland
    Posts
    3,001
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    Prepare yourselves for an SPS worldwalking system in 3 weeks
    I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.

    Marpis will be back in the game! Temporarily, at least.
    Great to hear !

    Koska on TJ0? : ) Aamujaa!

    ~Home

  9. #9
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,849
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Home View Post
    Great to hear !

    Koska on TJ0? : ) Aamujaa!

    ~Home
    Tammikuun 6. pääsee pois
    Itse et varmaan ole armeijas vielä käynytkään, älä niitä aamuja huutele!

  10. #10
    Join Date
    Feb 2006
    Location
    Finland
    Posts
    3,001
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Smile

    Quote Originally Posted by marpis View Post
    Tammikuun 6. pääsee pois
    Itse et varmaan ole armeijas vielä käynytkään, älä niitä aamuja huutele!
    Ehei. Käyty on Olin PSTK:ssa Säkylässä.

    Mutta jaksamisia sinne!

    ~Home

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    Prepare yourselves for an SPS worldwalking system in 3 weeks
    I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.

    Marpis will be back in the game! Temporarily, at least.
    Awesome!

  12. #12
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    UPDATED ~ Essence mine added:
    Progress Report:
    Cohen Adair (4):
          Updated sps.simba to work with dungeons (involves a slightly different setup)
          Essence mine now works + added an easy setup for other dungeons
          Added a Constant field to TSPSSurface
          Added a Tolerance field to TSPSSurface
    With this update there is a different setup involved (old one will still work, it will just use the Runescape Surface as the defauly surface), so there shouldn't be any scripts that break because of this.

    Updating the first post now.

  13. #13
    Join Date
    Aug 2008
    Location
    Oklahoma, USA
    Posts
    157
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks like tomorrow will be a fun coding day, it sure has been a long week..

  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Quote Originally Posted by sf411 View Post
    Looks like tomorrow will be a fun coding day, it sure has been a long week..
    I also just found out that the entire Essence mine map is dynamic. Basically if you look at the top left corner of this map, that top left corner could be at the top right, bottom right or bottom left. It changes every time you enter the mine. Obviously, the same goes for the rest of the corners.

    This shouldn't run in to issues since they're basically the same shape, but if it does, I can make 4 different images so the top left corner appears in all four corners (like a rotation images).

    Also sf411, make sure you keep that list I sent you in a PM, it'll be a good reference. Let me know how it goes, and PM me for any help.

  15. #15
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Made an update today that tremendously sped up SPS_GetMyPos. The ClickNorth call was causing it to wait an extra 1500-2000ms (setAngle in SRL waits no matter what the current angle is at).

  16. #16
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,459
    Mentioned
    2 Post(s)
    Quoted
    5 Post(s)

    Default

    Can we get an extension to download SPS? would be awesome.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  17. #17
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,810
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I feel like a system for this should be implemented that uses a "delta" of sorts to work with the images. They are already very large, and its hard to ship that many easily. Thus, having a system that would update each image when it needs to be, rather than the entire bulk would be ideal.

    This is not the easiest system to implement, but I think doing a grrep/regex of commit information would return which files are needed, then the update package could be updated as well. I can look into this as well, but it would involve someone hosting /two/ packages. One of the system in its entirety, and the other of deltas.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  18. #18
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,000
    Mentioned
    84 Post(s)
    Quoted
    542 Post(s)

    Default

    Quote Originally Posted by Sir R. M8gic1an View Post
    Can we get an extension to download SPS? would be awesome.

    ~RM
    It's planned for the near future.

    Quote Originally Posted by Nava2 View Post
    I feel like a system for this should be implemented that uses a "delta" of sorts to work with the images. They are already very large, and its hard to ship that many easily. Thus, having a system that would update each image when it needs to be, rather than the entire bulk would be ideal.

    This is not the easiest system to implement, but I think doing a grrep/regex of commit information would return which files are needed, then the update package could be updated as well. I can look into this as well, but it would involve someone hosting /two/ packages. One of the system in its entirety, and the other of deltas.
    That would be ideal, yes, but Wizzup? said the size isn't a big deal.

  19. #19
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,810
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    It's planned for the near future.

    That would be ideal, yes, but Wizzup? said the size isn't a big deal.
    It is for people downloading.. :/
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  20. #20
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,225
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    That would be ideal, yes, but Wizzup? said the size isn't a big deal.
    He is getting a new server with crazy bandwith so...
    The Cutting Edge - Outdated

    Current Project: Request Me Something

    "Logic never changes, just the syntax" - Anonymous?


    Remember, The Edit Button Is There For A Reason!!!

  21. #21
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    433
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Ok, gotta admit this looks like something pretty god damn amazing.

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

    Default

    Quote Originally Posted by Yago View Post
    He is getting a new server with crazy bandwith so...
    Not everyone lives in the Europe.

  23. #23
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,593
    Mentioned
    82 Post(s)
    Quoted
    71 Post(s)

    Default

    Quote Originally Posted by Daniel View Post
    Not everyone lives in the Europe.
    I'm sure we can think of something.
    Perhaps even incremental updates, depending on the way SPS needs to be updated.

  24. #24
    Join Date
    Feb 2006
    Location
    Franklin, Ohio, USA
    Posts
    991
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Two ways would be good, if server bandwidth is a concern, why not distribute it via bittorrent?

    But if you want to just download changes from a HTTP server, then this is the way to go:
    http://zsync.moria.org.uk/

  25. #25
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,593
    Mentioned
    82 Post(s)
    Quoted
    71 Post(s)

    Default

    Quote Originally Posted by moparisthebest View Post
    Two ways would be good, if server bandwidth is a concern, why not distribute it via bittorrent?

    But if you want to just download changes from a HTTP server, then this is the way to go:
    http://zsync.moria.org.uk/
    RSync is nice yes, but you'd need a client implementation?

Page 1 of 13 12311 ... LastLast

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
  •