Access to Multitouch as an Object Variable

A feature I’d like to see in Hopscotch is:

Accessing Multitouch as an object variable.

For now, if i put 2 fingers on screen, Last Touch X and Last Touch Y jumps right to the latest finger tapping the screen. This is not user-friendly for games that need 2 joysticks - well, you literally almost can’t make 2 joysticks game.

If this someday gets implemented in hopscotch, this will revolutionize the way people code: (Self) Last Touch … tracks the position of the finger which is dragging it. For example, if i’m testing a joystick :joystick: and my friend decided to spam touch the screen to annoy me well that’s called an enemy but we don’t care, the joystick will not follow my friend’s finger*!! (unlike the Last Touch … in game variable)

* It will if your friend tap on your joystick, of course.

Here is a similar topic:

I don’t suggest merging, even if both are about multitouch, since t1’s suggestion uses string while mine uses object variables. Personally, mine would be more intuitive for new users, because they can easily set, for example, Set Position to (Gorilla) Last Touch X, (Gorilla) Last Touch Y, while you would need to mess around with strings with t1’s idea.

Here are some examples of Hopscotch code that could be improved if we had this:

  • Games that need 2 joysticks to play.
  • Advanced piano project.
  • Combined joystick-arrow game.
  • Games/Art pads with zoom and de-zoom option.
  • (just generally games where you’ll need to play with more than 1 finger)

Here is an example design I’ve made:

12 Likes
  • Brilliant idea!
  • Meh, i don’t really like it :))

0 voters

8 Likes

In order for any of that to work, THT would need to find ways to differentiate each finger to prevent a touch location from being switched to a different finger.

Also, nice photoshopping, you almost had me fooled into believing it was real.

8 Likes

Also, I’m pretty sure this has been requested before.

2 Likes

did you read my op lol?

2 Likes

They should still be merged, lol.

3 Likes

irdk, fear read my topic and didn’t say anything about merging - and mine and t1’s are different-ish ideas :bulb:

2 Likes

Well, it’ll be interesting to see how it turns out if it gets considered…

3 Likes

My suggestion uses lists (I had just edited a screenshot with the text operators) but I think they are distinct like you mentioned.

5 Likes

^^ my thoughts as well, which is why i didnt do anything, if youre still wondering

3 Likes

This is a really interesting way to do it without arrays (plus, it’s more intuitive than just a touch point in an array, since it’s visible by object), and using some objects and custom rules you can convert it into an array if such a thing did exist in Hopscotch.

Great idea, and I second it.

That already exists in JavaScript via the touches object. It would only require translating those touches to object presses, which I think might already be mapped.

6 Likes

How did you do that pic?!?!? @Tri-Angle!

2 Likes

It was photoshopped (meaning edited). And they did a great job of doing it.

2 Likes

I once tried making tank-drive, but I couldn’t get it to work, even with AE’s Gamepad support in the modded player.

2 Likes

they just did 2 user variables lol!!!

3 Likes

They still edited them to make them look orange like the others. Remember: user-made variables are yellow.

*object variables. They don’t have the sub.

3 Likes

(i’m a he)

and no @Pickel, i didn’t just create two user-made variables, or otherwise those will not be in that place and as crosby said, user-made variables are yellow

1 Like

Omg sorry must have been a furtive editing process, sorry for judging wrongly :( :crying_cat_face:

2 Likes

nah it’s fine, don’t worry :))

2 Likes

I refer to everyone as “They” unless started otherwise. You didn’t add your preferred pronouns to your profile, so I didn’t know. I’ll try to remember next time.

2 Likes