Free Swift and Sprite Kit Tutorial
From our Pinball Games Tutorial Series – Part 7:Â Programming External Controllers – Extended GamePad
In this Swift video tutorial, we’ll begin programming code to connect external game controllers to the app. Yes, the Nimbus Steel Series included. This will allow bluetooth game controllers to play your pinball table, on both iOS or tvOS systems. We begin by adding controller observers, to listen for the controller connecting or disconnecting. We’ll then discuss setting the playerIndex, so player 1 might be assigned to one controller and player 2 is assigned to another. We’ll then program the extendedGamepad’s valueChangedHandler to actually listen out for specific buttons being pressed. This might be the dpad (directional pad), thumbstick (left or right), or other buttons.