Results 1 to 18 of 18

Thread: MM to MS demo

  1. #1
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default MM to MS demo

    edit: I replaced minimap.pointsToMainscreen() with this in my PC script and it's a massive improvement. It's accurate ~90% of the time.
    Got bored and started messing around.


    (sorry for garbage quality vid)

    I'm manually changing the compass angle while the script is running to show how it tracks at any angle.

    This function should work pretty well on flat land. I haven't made a non-manual calibration process yet (and probably never will).
    Simba Code:
    function TPoint.MM2MS(): TPoint;
    var
      a, b, c, d, e, f, g, h: extended;
      x: TExtendedArray;
    begin
      x := [
              3.41898284234469, // a = fixed scale factor in X direction with scale Y unchanged.
            -0.842020268789697, // b = scale factor in X direction proportional to Y distance from origin.
             -2101.27407475151, // c = origin translation in X direction.
           -0.0150738403260808, // d = scale factor in Y direction proportional to X distance from origin.
              2.58817766359727, // e = fixed scale factor in Y direction with scale X unchanged.
             -162.127294292026, // f = origin translation in Y direction.
         -0.000237848858259821, // g = proportional scale factors X and Y in function of X.
          -0.00286437539759803  // h = proportional scale factors X and Y in function of Y.
           ];

      a := x[0]; b := x[1]; c := x[2]; d := x[3];
      e := x[4]; f := x[5]; g := x[6]; h := x[7];
      result.x := round((a*self.x + b*self.y +c)/(g*self.x + h*self.y +1));
      result.y := round((d*self.x + e*self.y +f)/(g*self.x + h*self.y +1));
    end;

    This is where I got the method from:
    http://www.corrmap.com/features/homo...sformation.php

  2. #2
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    What about lower camera angles/different levels of zoom?




    Skype: obscuritySRL@outlook.com

  3. #3
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    What about lower camera angles/different levels of zoom?
    Nah. Low camera angles would be hard to make accurate and different levels of zoom would require more effort than I'm willing to put forth

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

    Default

    code?

  5. #5
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by Olly View Post
    code?
    Half of it is in MATLAB, so I still have a lot of work to do before it's a single file

  6. #6
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Great work, looking forward to seeing the code

  7. #7
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  8. #8
    Join Date
    Jun 2014
    Location
    Lithuania
    Posts
    475
    Mentioned
    27 Post(s)
    Quoted
    200 Post(s)

    Default

    Nice. But there is a huge problem with this as it is rought especially when in action while rotating camera for example camera angle shifts to lower and espcially in bigger screen likes 1366x768 or 1920x1028 it isnt even close to accurate. As i only use this method to save computer resources scanning expanded box from the projected point instead of scanning whole screen. In lower distances like papayas collecting to remember spots you clicked i just used rotation and translation matrices, no perspective and it was accurate enough and camera angle shift wasnt significant at short distances but at long ones it has serious problems, cant rely only on mmtoms transformation also because pixels tend to be shifted from their actual possition on the minimap too. And the bigger the screen the higher innacuracy apears compared to using mainscreen objects. But if they arent possible or accurate enough then this method is totally worth trying.

    Iv used this method to lower search boxes in qbd script as i runned in fullscreen and high resolution. Also used vector determinant to tell if i am in the water or on the land regardless of camera angle. And some other vector stuff to dodge firewall while ranging. Tried to grab qbd using solely mmtoms transformation wasnt succesfull enough because the bigger the screen the higher innacuracy apears even with very low camera shifts, and shifting it up every time you rotate camera is bottish. So came back to color functions but decreasing search area is extremely benefitial computer resources wise.

    And i think i used 3.378 for x shift, other constants close to yours. might have been my problem with innacurate counting of those constants, might try urs ones maybe will work better . Would like to see how you got those estimations. Also if i remember correctly i had different constants calculated using different resolutions somehow, not sure now, as that is abandoned few months now as having really hard exams atm.

  9. #9
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by cosmasjdz View Post
    ...
    It's only meant to work at the highest camera angle, zoomed all the way out. I pretty much never move the camera in any of my scripts, so it's good enough for me. My only use for it currently is my PC script, which was previously using the SRL version. It was pretty inaccurate so I made my own. I might use it in the future if I'm too lazy to pick colors or something.
    You'd probably have to recalibrate it at different resolutions. I use SRL, so my setup is always the same.

    I calibrated it by dropping an item on the ground and positioning myself and the camera such that the object was in the corner of the mainscreen. From there you can easily get the tpoints for the object on both the mainscreen and the minimap. Repeat this for each corner then solve the system to get the scaling factors.

  10. #10
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Good work! That's pretty cool

  11. #11
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

  12. #12
    Join Date
    Oct 2014
    Location
    With ezreal~
    Posts
    295
    Mentioned
    45 Post(s)
    Quoted
    255 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    Aww I got excited at the title...still good work though. Thanks for sharing
    Shouldn't you already have something like this for your dungeoneering script? *COUGH COUGH NUDGE NUDGE*



    It's not gay if it's efficient.

  13. #13
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by Taric View Post
    Shouldn't you already have something like this for your dungeoneering script? *COUGH COUGH NUDGE NUDGE*
    I did mess around with @zmon's 3D projection for a solid 72 hours before giving up, with the correct constant camera angle/full zoom out it is very powerful. Unfortunately in my OGL scripts (and DG specifically, since you asked) I am rotating the camera/changing zoom constantly, so I need something that is compatible with any camera angle or zoom level. I have not had the time to learn the math necessary for that, and haven't been able to find something already on the forums.

    And yes, you do need to rotate the camera/zoom in a DG script that is believably human/at a tolerable efficiency. The south portion of a room, in particular, the door, is always obstructed from view by the southern wall. One could hover the mouse randomly until it finds some overtext I suppose but that's a pretty silly alternative to me...that would scream botting.

    Hence my excitement in thinking all my problems were solved
    Last edited by Clarity; 05-14-2015 at 03:59 AM.

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

    Default

    I suppose i will add this to srl-6 soon..

  15. #15
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    And yes, you do need to rotate the camera/zoom in a DG script that is believably human/at a tolerable efficiency. The south portion of a room, in particular, the door, is always obstructed from view by the southern wall.
    Wouldn't compass rotation alone be enough though? I wouldn't think you'd need compass, mainscreen, AND zoom adjustments.
    Although I can't really talk since I've been putting off a DG scripts for quite some time now.. I'll do it someday

    One could hover the mouse randomly until it finds some overtext I suppose but that's a pretty silly alternative to me...that would scream botting.
    I do this all the time I'm really lazy about picking colors

  16. #16
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Quote Originally Posted by evilcitrus View Post
    Wouldn't compass rotation alone be enough though? I wouldn't think you'd need compass, mainscreen, AND zoom adjustments.
    Camera height, rotation, zoom, and client size all need to be considered if you're looking for accuracy.




    Skype: obscuritySRL@outlook.com

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

    Default

    It depends what accuracy you want though, Personally I just use mmtoms to give me a tiny search box to search something in (like a 60x60 box). And is more than perfect for that.

    You may not even be able to get it accurate 100% with ogl (with the right hooks) because jagex shift the minimap dots slightly so they're not aligned from mm tile to ms tile (atleast they used to, there is a thread on here somewhere).

  18. #18
    Join Date
    Jul 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Resolved.

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
  •