Use iPhone as a game controller in a tvOS app?

后端 未结 4 1024
说谎
说谎 2020-12-23 21:52

During the Apple TV announcement, the developers of Crossy Road demonstrated using an iPhone as a 2nd controller for an Apple tv game:

http://www.macrumors.com/2015/

4条回答
  •  暖寄归人
    2020-12-23 22:33

    I've developed a framework that supports the creation of software-based controllers and directs the input through a MFi profile, allowing you to have a single codebase that handles both software and hardware controllers. Many other features as well:

    https://github.com/robreuss/VirtualGameController

    NSNetservice is used for connectivity, and all Apple platforms are supported (iOS, OS X, watchOS and tvOS).

    All features:

    • Mimics API for Apple's GameController framework (GCController)
    • Device motion support in software controllers
    • Custom controller elements
    • Custom element mapping
    • WiFi-based, with Bluetooth fallback
    • Controller-forwarding
    • Works with Apple TV Simulator
    • Unlimited number of hardware controllers on Apple TV (using controller forwarding)
    • Ability to enhance inexpensive slide-on/form-fitting controllers with motion, extended profile elements and custom elements
    • iCade controller support (mapped through the MFi profiles so they appear as MFi hardware)
    • Easy-to-implement 3d touch on software controllers
    • Leverage on-screen and Bluetooth keyboards using software controllers (including with Apple TV)
    • Support for snapshots (compatible with Apple's snapshot format)
    • Swift 2.1
    • Framework-based

提交回复
热议问题