Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Touch v.s. click on Apple TV remote
Started by funkyvisions Dec 31 2015 04:03 PM

24 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Ok, I'm finally testing on the Apple TV device itself (because the simulators are lacking as far as testing the remote buttons).  I don't see any events come through for just touching the remote trackpad surface.  Only for clicks (pushing it down) and swipes.  How is this suppose to work? For example, Jet Pack Joyride allows you to just rest your thumb on the pad to activate the jetpack.  I would like my game to treat a touch and click the same, since it's a one button game.  Ideas?



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

We  had to remove the Up/Down/Left/Right events from the touch pad as they were generating too many events. For instance if you swipe down, and were not exactly 180 degrees, you would also get left and right events which made trying to a grid impossible.

 

The proper way is to use the Axis event. There is another thread about this: 

 

https://forums.coronalabs.com/topic/60509-apple-tv-remote-swipes-return-multiple-key-values/

 

I posted some code from one of our engineers that mimics - y axis only button control in that thread.  As far as game play moving players around the screen can also be done with axis events.

 

Rob



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

See your other thread.



[TOPIC: post.html]
#4

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

I am getting axis events. I'm talking about tap events. I want to detect when the remote trackpad area is tapped (not clicked and not swiped). Try jet pack joyride and other games. You'll see you don't have to click the remote. A tap and click behave the same.

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

Do you get an axis event if you just touch the pad?



[TOPIC: post.html]
#6

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Nope.

 

Do you get an axis event if you just touch the pad?



[TOPIC: post.html]
#7

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

I opened up case #44518 for this.  Hopefully it's something that will be considered a priority since almost all other apps respond to tap.



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

Here is some stuff to ponder while Engineering look at this.

 

Touch events: with iOS, they are absolute. That is the .x. and .y you get from a touch event maps 1:1 to your content coordinates on the screen. On tvOS, touch is relative. We will have to create a special "relativeTouch" or "tvOS" touch event and this is going to take time.

 

Tap events: tap events have no concept of "is the pad being touched or not". It would only generate the one tap event upon completion of the user lifting their finder. If I understand correctly this won't help you either.

 

At this point, it's in engineering's hands.

 

Rob



[TOPIC: post.html]
#9

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

Any update on this?  Still would like to be able to treat a tap like a click.



[TOPIC: post.html]
#10

Marcos Martini

[GLOBAL: userInfoPane.html]
Marcos Martini
  • Enthusiast

  • 37 posts
  • Corona SDK

Gotta agree with funkyvisions, 

 

Given the popularity of super casual games and 1 button game play  it is very important to have the tap event for the apple Tv. Most of the featured games on the apple tv store are 1 button games, where you often just have to tap to play. Since most 1 button games are fast paced games, clicking the button gives a laggy feel...



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

Can I get someone to create a feedback request for this at http://feedback.coronalabs.com and get it voted up?

 

Thanks

Rob



[TOPIC: post.html]
#12

Marcos Martini

[GLOBAL: userInfoPane.html]
Marcos Martini
  • Enthusiast

  • 37 posts
  • Corona SDK

feedback requested created at http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/12420582-tap-detection-apple-tv-remote

 

I understand this is a basic feature that the Corona SDK tvOs should have but anyway, vote it up! Thanks Rob and @funkyvisions



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

I agree this is a basic feature. However keep in mind that we are still "beta" with Apple TV. There are rough edges that need smoothed out. The remote handling is one of those things. We know the remote needs work. We also have to make it fit within the Corona ecosystem too. It's different enough to pose a good challenge for us.

 

Rob



[TOPIC: post.html]
#14

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

We have improved tvOS remote interaction that didn't make it into the public release. Keep an eye out here in a week or so.



[TOPIC: post.html]
#15

Studycat2

[GLOBAL: userInfoPane.html]
Studycat2
  • Enthusiast

  • 72 posts
  • Corona SDK

Hi,

 

We're working on making the remote interact as close as possible to the way it does in the tvOS menu. 

 

We've encountered some difficulties.

 

1. Taps don't get reported. (in the system menu, tapping anywhere the remote will move the focus one space in that direction)

 

2. We want to try absolute positioning mode but system.getInputDevices() returns an empty table {} :(. So we can't.

 

3. When swiping, the axis normalizedValues are quite inconsistent for longer swipes. For example, some long swipes give a max axis value of 0.6, others get closer to 1.0, even though the swipes were very similar to each other. 

 

Hopefully this list will help you identify what needs fixing. If you need any more testing done, or need some sample code, please let us know.

 

Look forward to an update! 

 

Thanks,

Studycat



[TOPIC: post.html]
#16

Marcos Martini

[GLOBAL: userInfoPane.html]
Marcos Martini
  • Enthusiast

  • 37 posts
  • Corona SDK

We have improved tvOS remote interaction that didn't make it into the public release. Keep an eye out here in a week or so.

 

Any news on the improvements Michael?

 

Thanks!



[TOPIC: post.html]
#17

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

Not yet.

 

Rob



[TOPIC: post.html]
#18

Marcos Martini

[GLOBAL: userInfoPane.html]
Marcos Martini
  • Enthusiast

  • 37 posts
  • Corona SDK

Hi Rob, 

 

Got an email from Corona ref. to my feature request saying that the tap has been implemented on tvOS as "buttonZ". I tried to test it with build 2837 but still doesn't work. Could you confirm if this is implemented and in which build number? 

 

Thank you!



[TOPIC: post.html]
#19

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

The new tvOS input updates should be in 2838. "buttonA" remains as the remote press, while "buttonZ" is a light tap. There's also a new "relativeTouch" event that provides much the same information as the axis events, with an additional "tapCount" event parameter during the ended phase (for tracking double/triple/etc taps). Docs for this are pending some polish.



[TOPIC: post.html]
#20

Marcos Martini

[GLOBAL: userInfoPane.html]
Marcos Martini
  • Enthusiast

  • 37 posts
  • Corona SDK

That's awesome Michael, thank you very much!



[TOPIC: post.html]
#21

Studycat2

[GLOBAL: userInfoPane.html]
Studycat2
  • Enthusiast

  • 72 posts
  • Corona SDK

Thanks for the update 2838. We are working on 'relativeTouch', and think this will make it easier to consistently determine the direction and length of swipes. 

 

system.getInputDevices() still returns an empty table {}.

 

The buttonZ for a light tap works, but unlike Apple tvOS, it does not report x and y axis values, which we need to use it as a directional controller. Can you add this in an update?

 

Thanks,

Studycat



[TOPIC: post.html]
#22

Studycat2

[GLOBAL: userInfoPane.html]
Studycat2
  • Enthusiast

  • 72 posts
  • Corona SDK

Hi,

 

Any progress on these two issues?

 

1) system.getInputDevices() returns an empty table {}.

2) buttonZ reports no x and y values

 

Thanks

Studycat



[TOPIC: post.html]
#23

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,061 posts
  • Enterprise

No updates yet.



[TOPIC: post.html]
#24

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

Hi,

 

Any progress on these two issues?

 

1) system.getInputDevices() returns an empty table {}.

2) buttonZ reports no x and y values

 

Thanks

Studycat

As a note for #1, system.getInputDevices() should work. Can you put that code chunk behind a timer.performWithDelay()? It may need a frame or two to initialize.



[TOPIC: post.html]
#25

funkyvisions

[GLOBAL: userInfoPane.html]
funkyvisions
  • Contributor

  • 105 posts
  • Corona SDK

I've released an update to my game using buttonZ.  Thanks for implementing.  Now just waiting for local storage, gamecenter, and storekit and I'll be in synch with my iOS version.




[topic_controls]
[/topic_controls]