Page 2 of 4

Re: commands U.I friendly

Posted: Sun Jan 16, 2022 8:04 pm
by richmond62
SShot 2022-01-16 at 21.02.52.png
-

Re: commands U.I friendly

Posted: Sun Jan 16, 2022 8:17 pm
by Samuele
allright, that's starting to look more like it, thanks, can i create a sort of path that the ball will follow when i just drag a bit towards where i want it to be? (like i create a create a graphic but in running process that the ball will follow).
Thanks!

Re: commands U.I friendly

Posted: Sun Jan 16, 2022 8:49 pm
by richmond62
That's an odd idea.

If I drag towards somewhere the program has to predict where that somewhere is:
-
SShot 2022-01-16 at 21.45.16.png

Re: commands U.I friendly

Posted: Sun Jan 16, 2022 9:00 pm
by Samuele
you're right only if there isn't a way to quantify the 'strength' that the user puts in his drag action in livecode, (like you can see in plenty of games for mobile)

Re: commands U.I friendly

Posted: Sun Jan 16, 2022 9:32 pm
by richmond62
I don't know if there is a way to do that.

But Jacque is rather good at polling the mouse.

I think, that with LiveCode the best way to determine 'strength' is to divide the time taken for a grab move
by the distance moved: and the lower the figure the further away the target should be.

i.e. capture the time at mouseDown, capture the time at mouseUp, do a spot of Pythagoras with the move, and so on . . .

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 12:20 am
by SparkOut
A very old sampler that played with a "power up" technique viewtopic.php?f=7&t=17177&p=86774#p86802

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 5:50 am
by bobcole
Following up on Richmond62's recommendation, I devised an example to calculate the "speed" of dragging an object (a button in this case).
The faster you drag the button from one place to another, the higher the speed in pixels per tick (a proxy for the 'force' exerted).
Admittedly rough but it was a fun exercise that might help.
Bob
DragLineSpeed.livecode.zip
(2.31 KiB) Downloaded 737 times

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 12:02 pm
by richmond62
Screen Shot 2022-01-17 at 12.58.38 PM.png
-
Began to feel "funny" about dividing a number by 0 . . .

"Objously" :? will have to work with LONG SECONDS.
-
Screen Shot 2022-01-17 at 1.15.47 PM.png
Screen Shot 2022-01-17 at 1.15.47 PM.png (19.7 KiB) Viewed 44055 times

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 12:39 pm
by Samuele
bobcole wrote: Mon Jan 17, 2022 5:50 am Following up on Richmond62's recommendation, I devised an example to calculate the "speed" of dragging an object (a button in this case).
The faster you drag the button from one place to another, the higher the speed in pixels per tick (a proxy for the 'force' exerted).
Admittedly rough but it was a fun exercise that might help.
Bob
DragLineSpeed.livecode.zip
richmond62 wrote: Mon Jan 17, 2022 12:02 pm
Screen Shot 2022-01-17 at 12.58.38 PM.png
-
Began to feel "funny" about dividing a number by 0 . . .

"Objously" :? will have to work with LONG SECONDS.
-
Screen Shot 2022-01-17 at 1.15.47 PM.png
SparkOut wrote: Mon Jan 17, 2022 12:20 am A very old sampler that played with a "power up" technique viewtopic.php?f=7&t=17177&p=86774#p86802
Yeeeees, that's it, but there's just one problem, I'm a beginner so I don't understand entirely the script, would someone pls tell me what's happening in this awesome scripts? Thanks!!

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 12:58 pm
by richmond62
crud.jpg
-
Aaaaaaah: wish you were here.

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 1:04 pm
by Samuele
richmond62 wrote: Mon Jan 17, 2022 12:58 pm crud.jpg
-
Aaaaaaah: wish you were here.
allright that's starting to make some sense, so in the stack you sent i just need to divide the Space that the object was moved by the time that has taken, right? but then how can i make it become different movements (for every differen speed a movement that has the same speed and a longer/shorter path)? or is it already in the stack this value?
Thanks

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 1:08 pm
by richmond62
If the end-user, when they grab the football move fast then that will yield a shorter time in seconds than if they
move slowly . . .

This is the sort of Mathematics I did when I was about 11. 8)

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 1:09 pm
by Samuele
:shock: i wonder what you did after :roll: ...

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 1:10 pm
by Samuele
out of curiosity, who puts the fire icons on the posts?

Re: commands U.I friendly

Posted: Mon Jan 17, 2022 1:14 pm
by richmond62
i wonder what you did after
Not much.

1. When I was 15 I got an 'A' in English O level Mathematics.

2. When I was 18 I got an 'E' in English A level Mathematics ( i.e. just missed a fail).

Somewhere between 1 and 2 something went wrong. :D

BUT; the outdated belief that one has to be a Mathematical genius to program computers is nonsense.