SRL Archive - Discussions and Debates

Fitts Law & Mouse Moving


Sir R. M8gic1an

2012-04-29 20:07:43

I got this from a little software engineering lecture, for which I just happen to be revising.

Fitts’ Law predicts that the time to point at an object using a device is a function of:
the distance from the target object
the object’s size
The further away & the smaller the object, the longer the time to locate it and point to it.


We could make use of this to differentiate between clicking inventory stuff (they're usually smaller than big objects like trees) and to differentiate the mouse speed of clicking a rock vs a tree.

Ofc u probably wouldn't click a tree and a rock in the same script. But this gives us yet another idea on how to look more human

eg. the difference of speed between clicking the ore in your inventory and then clicking the furnace. For the furnace you would make a much faster mouse movement cus it's a lot larger

For the trees, you'd make a slower movement to click a bird nest vs chopping tree.

I thought I'd post this cus since we usually click by x&y we never really take into account the size of the object.

-RM

Rich

2012-04-30 02:39:01

It could be done, and would be pretty impressive when done, but do we really need it? Do you think those bot detectors they have (if any) would look at the speed at which you move the mouse to certain items?

Abu

2012-04-30 02:44:45

Hmm not a bad idea, but then you get tempted to increase the MouseSpeed for the smaller objects as well.

smurg

2012-04-30 03:13:22

From: Rich
It could be done, and would be pretty impressive when done, but do we really need it? Do you think those bot detectors they have (if any) would look at the speed at which you move the mouse to certain items?


Well I mean right now, Jagex isn't banning anyone for botting.

But it would be an interesting exercise and could still be implemented in case the action against bots changed in the future.

Gala

2012-04-30 06:28:07

I think it is a good idea. I don't know what is happening behind the java applet, but in case they have such advanced mouse tracking systems, this would be fine.
You could also add delays that become longer and happen more often with time. Same with missclicks. This could simulate a tired human after an hour of powermining or so.

masterBB

2012-04-30 07:14:26

Tired human:
{$DEFINE UseLaptopMouse}
{.include srl/srl.simba}

Const
XFactor = 0.050;

begin
SetupSRl;
repeat
//your mainloop
LMouse_MissChance := floor(1000 - (GetTimeRunning / 60000.0 * XFactor));
until(false);
end.

Gala

2012-04-30 07:31:36

Something like that, yes.
But isn't it the responsibility of each scripter to implement this on his own?

putonajonny

2012-04-30 11:37:34

From: Gala
Something like that, yes.
But isn't it the responsibility of each scripter to implement this on his own?


In all my recent scripts I have had very dynamic mouse speeds, seems to look a lot more human so yeah I agree with this.

Sir R. M8gic1an

2012-04-30 17:28:35

From: abu_jwka
Hmm not a bad idea, but then you get tempted to increase the MouseSpeed for the smaller objects as well.


According to this law you'd decrease speed for smaller objects.

-RM

Abu

2012-04-30 17:31:38

From: Sir R. M8gic1an
According to this law you'd decrease speed for smaller objects.

-RM


I understand the law, I was simply stating it would be tempting to then just increase the overall mouse speed…

Having said that, it would make scripts more Human-Like and I will be looking to integrate something like this in future scripts :)

abu_jwka, making a difference, one small step at a time…

Sir R. M8gic1an

2012-05-01 08:54:56

Well, the way I'd go about implementing this would not be too hard. I'd make sure that there would be a function that could be easily called; In fact my aim would be the following:

TPAMouse(Centre: boolean; rx, ry: integer; TPA: TPointArray)

Centre true it would aim for the centre, false it would aim for a larger square in the TPA

Could also be
SizeMouse(x, y, rx, ry, size: integer)

This would apply the usual mouse algorithms, taking size into account. Quite possibly at some level these functions would come to blend with WindMouse, although this algorithm being a hell lot simpler.

http://usabilityfriction.com/2010/06/07/fitts-law/

-RM

Abu

2012-05-02 01:13:05

Just read up on the link you posted RM and I have to say, really easy to understand!

Also, how would you go about SizeMouse? Count the pixels and increase MouseSpeed?

Sir R. M8gic1an

2012-05-02 09:12:18

I'd apply the algorithm and use something like pixel count(array length), yes, but Im in exam period and not scripting at all atm.

http://www.dgp.toronto.edu/~ravin/papers/tochi2005_expandingtargets.pdf

What I think is that this could actually return a valid MouseSpeed to use at any time throughout the script, making in vary in the way a human would vary depending on target size and distance. It would make SRL a lot more human, include-wise and script-wise.

-RM