commands U.I friendly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
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!
Thanks!
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
That's an odd idea.
If I drag towards somewhere the program has to predict where that somewhere is:
-
If I drag towards somewhere the program has to predict where that somewhere is:
-
Re: commands U.I friendly
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)
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
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 . . .
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
A very old sampler that played with a "power up" technique viewtopic.php?f=7&t=17177&p=86774#p86802
-
- VIP Livecode Opensource Backer
- Posts: 136
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: commands U.I friendly
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
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
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
Began to feel "funny" about dividing a number by 0 . . .
"Objously" will have to work with LONG SECONDS.
-
- Attachments
-
- GRAB FORCE.livecode.zip
- Stack.
- (11.51 KiB) Downloaded 186 times
Re: commands U.I friendly
bobcole wrote: ↑Mon Jan 17, 2022 5:50 amFollowing 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
richmond62 wrote: ↑Mon Jan 17, 2022 12:02 pm-
Began to feel "funny" about dividing a number by 0 . . .
"Objously" will have to work with LONG SECONDS.
-
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!!SparkOut wrote: ↑Mon Jan 17, 2022 12:20 amA very old sampler that played with a "power up" technique viewtopic.php?f=7&t=17177&p=86774#p86802
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
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
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
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.
move slowly . . .
This is the sort of Mathematics I did when I was about 11.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: commands U.I friendly
Not much.i wonder what you did after
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.
BUT; the outdated belief that one has to be a Mathematical genius to program computers is nonsense.