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.
Never lose your place.
Sign up for the newsletter to get a free CartoonSmart account and track your progress in every course.