I built a custom arcade controller for an incredible new game called Panoramical. It is not a game in the traditional sense, in that there is no objective. It is an immersive visual and auditory landscape where you are in control of the geography and music. Just as Panoramical is not your typical game, the controller is not your typical joystick. The game is controlled by a set of 18 knobs and sliders that each has an effect on the landscape. Panoramical is a collaborative project by Fernando Ramallo and David Kanaga. Their development schetchbook has some great pictures and videos of the game.
The custom controller was built to show off Panoramical in an arcade cabinet at Fantastic Arcade 2013. Fantastic Arcade showcases new indie games, and is part of the annual Fantastic Fest film festival in Austin, Texas.
This is what Badass Digest had to say about it:
|“||By far the trippiest game of the Arcade, Panoramical allowed you to create musical landscapes. It utilized an insane custom controller provided by Mickey Delp of Delptronics, full of switches and knobs and what-have-yous. Strapping on the headphones and fiddling with things immersed you in a musical world like nothing else. My short time with this wasn’t nearly enough, and I really wish I could have gotten some more time in this one, especially because of that incredible controller.||”|
The game was developed using the Korg nanoKONTROL MIDI controller, which has 9 knobs and 9 sliders.
This picture shows the back of the control panel including the controller board. The switch on a wire was used to change scenes in the game. The scene change button was mounted behind the arcade cabinet so that only the operators could change the scene. That was done to avoid the temptation of the player to switch repeatedly between scenes, which would take them out of the immersive experience.
This is the panel space. The opening was covered with a piece of MDF covered in faux leather and the panel was screwed into it. I also installed a headphone distribution amp inside the cabinet so that two pairs of headphones could be hung on the cabinet. The area was very noisy. Listening to the game in the headphones meant that the background noise would be blocked out, and the player could hear all of the wonderful music in the game.
After the Fantastic Arcade, the arcade machines are all dismantled to be used again next year. So, I built a simple wooden desktop enclosure for the controller. I mounted a midi jack and scene change button on the back, and added a 9V battery holder to power it. I tried to build a much fancier enclosure with rounded edges and with the panel inset. I used the woodworking equipment at the ATX Hackerspace, where I am a member. Craig taught me how to use the chop saw and router. However, it was a bit too ambitious a project for my first time using those tools and it ended up a mess. So, I hacked together a simpler version, which works fine.
The Controller Circuit
The controller circuit consists of a 14-pin PIC microcontroller and two CD4051 chips. It is not a complicated circuit, but it does have one neat trick. I use two CD4051 1:8 multiplexor chips to read 16 pots with only 5 pins. The eight inputs of the CD4051 each go to the wiper of a pot. The terminals of the pots go to ground and to V+. The microcontroller uses three pins for the address of the CD4051, to select the pot. The output of each of the CD4051&aphos;s goes to an ADC (analog to digital) pin on the microcontroller. The other two pots go directly to ADC pins. The UART (universal asynchronous receiver/transmitter) output of the microcontroller is connected to a MIDI jack.
The code quite straightforward. It simply cycles through each of the 18 pots and, if the value has change, sends a MIDI CC (constant control) message to the UART. It also monitors the scene change button and sends a MIDI middle C note on message, which the game is programmed to recognize.
There is also one neat trick in the code. The value read from an ADC port is not stable. You can (will) get two different values from consecutive reads of the same pot, even if the pot has not moved. MIDI CC messages are 7 bits and the ADC is 10 bits, so we shift the value down 3 bits. If the pot is in the middle of the range for a 7 bit value, then when the lower 3 bits are discarded, the resulting 7 bit value will be the same. However, when the pot is roughly between two values, then the program will send the two values randomly due to the inherent ADC noise. That is rarely acceptable. In this case, it would mean that the landscape element controlled by that pot would visually jump around with the different readings. The solution I use is twofold. First of all, I wait to get two consecutive equal readings for a given pot. Then, I check to see if the value is 2 or more bits different from the last value I sent. If so, then the pot moved and I send that new value.
I may be minimizing the difficulty of this project. It is probably not a good first project. However, I work with MIDI embedded programming a lot, so I think I was good for the job.
I may be minimizing the difficulty of this project. It is probably not a good first project. However, I work with MIDI embedded programming a lot, so I think I was a good person for the job.
Brendan Byrne&aphos;s Controller
I would be remiss if I did not mention Brendan Byrne. He built a beautiful desktop Panoramical controller. You should take a look at his pictures on flickr.