

If your game is being played on an iOS device with a formfitting controller, also decide whether the touchscreen and motion controls should also be available to the player. When adding controller support to your game, focus on how the player interacts with the game controller to play your game.
#Mac game controller abe software#
Profiles Map Hardware Controls to Software Needs Relevant Chapter: Discovering and Connecting to Controllers When a controller is disconnected, you usually pause the gameplay and switch back to the default controls. When a controller is connected, you use the notification’s controller object to obtain an object that represents the physical controller. Typically, most games use notifications so that they can provide the proper in-game experience to the player. Your game can inquire about which controllers are connected, or it can be notified when controllers connect or disconnect. After it is paired, whenever the game controller is turned on, it is automatically connected and made available to your game. During the discovery process, your game should display its own custom user interface and pause gameplay. Although support for pairing is normally provided by the operating system (typically in the Preferences or Settings, you can use the Game Controller framework to pair devices inside your game.
#Mac game controller abe mac#
Controllers may also connect to an iOS device, Apple TV, or Mac wirelessly, and these controllers work slightly differently: A wireless controller must be paired before it can be discovered by your game. When a controller is connected directly to an iOS device using the lightning connector, it is automatically discovered by the Game Controller framework and made available to your game. Relevant Chapter: Incorporating Controllers into Your Game DesignĬontrollers Are Automatically Connected Once Discovered When designing a tvOS game, you may require the use of an MFi game controller, but where possible you should also support the Siri Remote. Because all standalone controllers provide the extended controller layout, your app can always use the extended controller layout. When designing a Mac game, use the keyboard and mouse. Further, when you support the game controller, you may not require the use of the extended controller layout, although you can take advantage of the extended controls when they are available. When designing an iOS game, use the touchscreen and integrated sensors. If a controller is not available, your game must provide alternative controls. Therefore, never require the use of game controllers in your game. In the latter case, the touchscreen and motion sensors are still available to your app.Ī device can be either plugged directly into a device or connected to it wirelessly.Ĭontrollers Must Be Optional on iOS and OS XĮven though controllers are intended to enhance gameplay, not every person who purchases your game is going to own one. The devices that the Game Controller framework supports can differ in three distinct ways:Įvery device supports a specific layout of controls.Ī device can be either a standalone controller or a controller fitted directly to an iOS device. Your game discovers and configures a controller, and then reads the control inputs as part of its normal gameplay. The Game Controller framework makes it easy to discover game controllers connected to a Mac, iOS device or Apple TV. By supporting the Game Controller framework in your game, you support all of these game controllers. You can rely on a consistent set of high-quality controls in all game controllers because Apple has specified the look and behavior of the controls to MFi accessory manufacturers. Game controllers provide physical controls to trigger actions in your game.
