commands U.I friendly

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Sun Jan 16, 2022 8:04 pm

SShot 2022-01-16 at 21.02.52.png
-
Attachments
RANDOMER.livecode.zip
(10.95 KiB) Downloaded 138 times

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Sun Jan 16, 2022 8:17 pm

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!
Samuele.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Sun Jan 16, 2022 8:49 pm

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

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Sun Jan 16, 2022 9:00 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Sun Jan 16, 2022 9:32 pm

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 . . .

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: commands U.I friendly

Post by SparkOut » 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

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Tue Feb 23, 2010 10:53 pm
Location: Saint Louis, Missouri USA

Re: commands U.I friendly

Post by bobcole » 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
(2.31 KiB) Downloaded 121 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » 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
Screen Shot 2022-01-17 at 1.15.47 PM.png (19.7 KiB) Viewed 9834 times
Attachments
GRAB FORCE.livecode.zip
Stack.
(11.51 KiB) Downloaded 129 times

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Mon Jan 17, 2022 12:39 pm

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!!
Samuele.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Mon Jan 17, 2022 12:58 pm

crud.jpg
-
Aaaaaaah: wish you were here.

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Mon Jan 17, 2022 1:04 pm

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
Samuele.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Mon Jan 17, 2022 1:08 pm

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)

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Mon Jan 17, 2022 1:09 pm

:shock: i wonder what you did after :roll: ...
Samuele.

Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm
Location: Italy

Re: commands U.I friendly

Post by Samuele » Mon Jan 17, 2022 1:10 pm

out of curiosity, who puts the fire icons on the posts?
Samuele.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9249
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: commands U.I friendly

Post by richmond62 » Mon Jan 17, 2022 1:14 pm

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.

Post Reply

Return to “Games”