Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Details on Controller Support in Mac Simulator
Started by schroederapps Jun 30 2015 04:00 PM

4 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

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Contributor

  • 466 posts
  • Corona SDK

Hi CL Team:

 

I'm intrigued by the notes in the last few daily builds that mention controller support for the Mac simulator. Can we get any details on how to best implement this? Do we need to do anything on the OS X side of things, other than plug in a USB controller? Is wireless/bluetooth supported? Any details you can give would be most welcome - and this might make for a cool blog post, depending on how deep support goes. Really looking forward to being able to test analog stick input in the simulator!

 

Attached File  Screen Shot 2015-06-30 at 7.56.47 PM.png   9.52KB   0 downloads

 

Thanks,

Jason



[TOPIC: post.html]
#2

Michael W.

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

  • 276 posts
  • Alumni

There's a new sample code project that you can look at: https://github.com/coronalabs/samples-coronasdk/blob/master/Hardware/InputDevices/main.lua#L286-L326

You can find it in the most recent simulator builds under Hardware/InputDevices. You'll also find that keyboard input has improved on OSX recently, making it a bit more game-friendly.

We'll have a new, fancier sample code in the next week or so.

[TOPIC: post.html]
#3

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 852 posts
  • Corona Staff

Hey, Jason! Glad you're interested.

If your controller work with other games, it should work with OS X in latest daily build. Both bluetooth and usb controllers are supported. I tested 2015.2666 with Xbox 360/One (you would need drivers here, because Microsoft). Other controllers worked without drivers, like DualShock 4 (PS4) via bluetooth and cable, as well as PS3 and PS1 (with adapter), various logitech and no-name gamepads. As Michael wrote, Stay tuned for more information and nice sample. But all functionality is already in, as well as daily builds docs have documentation. It changed very little comparing to Android controller support.

To conclude - you can test analog stick in simulator right now. Use "axis" event. We already had a guide on how to implement gamepad support in our blog posts. May be we'll revamp some of those or just make some nicely documented extensive sample.

Have fun!



[TOPIC: post.html]
#4

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Contributor

  • 466 posts
  • Corona SDK

Thanks for the fast reply, guys! I'd been using a keymapping app to "fake" digital controller support on OS X, but that wouldn't work for analog input. I'm totally psyched to have more "native" type support. Will be test-driving it this week for sure!

[TOPIC: post.html]
#5

Michael W.

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

  • 276 posts
  • Alumni

Let us know how it goes. We've been doing some internal testing ourselves:
 

 




[topic_controls]
[/topic_controls]