commands U.I friendly

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

commands U.I friendly

Post by Samuele » Fri Jan 14, 2022 3:58 am

hello, are there in livecode any other commands such as drag that are more used in nowadays games?
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 » Fri Jan 14, 2022 9:50 am

Can you list the sort of commands you are thinking of?

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

Re: commands U.I friendly

Post by andresdt » Fri Jan 14, 2022 6:54 pm

Create a button and put the script on it

Code: Select all

on mouseDown pButtonNumber
   grab me   
end mouseDown
The result will be a draggable button. Is that what you are looking for?

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 » Fri Jan 14, 2022 9:25 pm

I would understand "other commands" (plural) to mean more than that.

However, the OP is given to such terseness that sometimes their questions are obscure.

I have requested amplification.

Whether this terseness is due to poor English, or just a heckling way of of demanding things, I'm not exactly sure. But the effect is the latter.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: commands U.I friendly

Post by FourthWorld » Fri Jan 14, 2022 11:19 pm

Samuele has 78 posts here, most quite obviously in earnest. I'd give a little time before casting judgment on this one.

It's actually a good question: the drag command is a holdover from HC, yet we have little in the engine to handle modern animation effects like multicell sprites, or even threaded animated GIFs.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 » Fri Jan 14, 2022 11:55 pm

I am 100% sure Samuele is in earnest.

I was commenting on the terseness of his postings, and not his obvious wish to learn.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: commands U.I friendly

Post by FourthWorld » Sat Jan 15, 2022 12:12 am

richmond62 wrote:
Fri Jan 14, 2022 11:55 pm
I am 100% sure Samuele is in earnest.

I was commenting on the terseness of his postings, and not his obvious wish to learn.
Maybe he's seen enough of my posts to see how things that are too long to read don't get read, so he's erring the other direction. ;)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: commands U.I friendly

Post by jacque » Sat Jan 15, 2022 6:43 pm

He's learning LC and making progress. The problem with learning a new programming language is that you don't have the vocabulary to explain what you're looking for. This is compounded by the fact that English may not be his first language. I don't hold any of that against him.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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 » Sat Jan 15, 2022 7:25 pm

Nor do I.

HOWEVER, it would be easier to help him if he were more verbose, even if he used what we might
term everyday terms, or even supplied some diagrams.

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 2:24 pm

:shock: I didn't want to cause any discussions, but wll all the things that you said are true, english is not my first language and it's difficult for me to express myself in english let alone using livecode or programming terms, but i try, and you'0re right that it's complicated to understand exactly what i mean. So i'll try to explain better, for exapmle what andresdt said
andresdt wrote:
Fri Jan 14, 2022 6:54 pm
a draggable button
but that's just one of... my question is are they any other commands like that (you may see them in other apps/games) or as FourthWorld said
FourthWorld wrote:
Fri Jan 14, 2022 11:19 pm
modern animation effects
or better for exaple the "movements" you can see on this picture
Immagine 2022-01-16 141452.png
Immagine 2022-01-16 141452.png (32.07 KiB) Viewed 9999 times
you may want to use one for exaple if you want to 'kick' a ball in a game ecc.
So, sorry for my english and thanks for the support.
Samuele.
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 3:43 pm

balls.jpg
-
https://www.dropbox.com/s/1xrvr2gaui9a5 ... e.zip?dl=0
-

Code in the football:

Code: Select all

on mouseDown
   grab me
end mouseDown

on mouseUp
   if intersect(image "ball", image "goal") then
      set the vis of image "smile" to true
      set the loc of img "ball" to 480, 300
      wait 4 secs
      set the vis of image "smile" to false
   else
      -- do nothing
   end if
end mouseUp
Have a super Sunday. 8)

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 4:53 pm

And BIG, FAT HANDS . . .
-
sweatyPaw.jpg
-
CURSOR X.livecode.zip
Stack
(20.44 KiB) Downloaded 139 times

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: commands U.I friendly

Post by jacque » Sun Jan 16, 2022 7:14 pm

The drag command is the easiest way to do it but you could also use a mouseMove handler to track the mouse and set the location of the object to the mouseloc. This does the same thing but requires more code and needs additional code to exit the drag. It isn't the best way to do it.

What effect do you want besides just moving the control? If you want shadows or other visual changes you can script those before the drag begins.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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 7:18 pm

jacque wrote:
Sun Jan 16, 2022 7:14 pm
What effect do you want besides just moving the control? If you want shadows or other visual changes you can script those before the drag begins.
by the way, I'm looking for mobile.
for example this:
Immagine 2022-01-16 184359.png
Immagine 2022-01-16 184359.png (22.57 KiB) Viewed 9948 times
or this:
Immagine 2022-01-16 184622.png
Immagine 2022-01-16 184622.png (61.56 KiB) Viewed 9948 times
don't know ho to say it, maybe a sort of swipe (for example in a soccer mobile game, you wuold kick the ball by swiping it forward or the way you want it to go).
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 7:47 pm

SShot 2022-01-16 at 20.46.29.png
-
Attachments
CLICKER.livecode.zip
Stack.
(10.62 KiB) Downloaded 132 times

Post Reply

Return to “Games”