Controllers for Pong: Part 5, The Interface

Even though my five functional controllers are barely interesting in operation, I’ve put the more adventureous ones aside temporarily. Rather, I’ve focused on the initial sequencing of game and ensuring that the physical switching between controllers happens smoothly for the user.

Below is a screen capture of the game initialization. Additionally, the console of the Processing sketch on the right shows when a new controller is identified (~ at 1:08 into the video).

Rather than use a keyboard to advance to different modes, I’d like to have a shared controller with a button for triggering game play and a knob to control ball speed.

The handshaking code to get the name of the controller and then set its behaviour is as follows: