Vaasa Game Days and Funky USB Controller
In about two weeks there will be a great two day event of computer games, gaming, development and future at University of Vaasa – Vaasa Game Days.
We decided to get into the right mood and as games as such might get a bit boring after longer exposures we decided to build a Funky Controller for controlling the game. We didn’t have any old game consoles or other units to we decided to go the retro and innovative way. Just build a controller and then figure out what games to play with it.
The plan was actually to make it a showroom piece for different kind of events and thus the controls need to be intuitive and easy to learn and the game itself easy to understand and short in terms of player rotation.
First part included some rubber feet and a piece of plywood. Trying to work on that we had to go through a variety of thicknesses and sizes and the final controller at the moment might not be the final as it is possible to add bigger plywood sheet on the current design.
Micro switches from the inventory and some springs was the next planned thing. This time the tiny (dia 2mm) mounting holes on the switches was the problem as there was need to fix multiple switches and those tiny screws were hiding too well. Two screws is not enough. It was a time for lunch and errands and at the same time a quick walk around the stores proved the hypothesis correct. During weekend it is impossible to get M2 sized screws of any type.
It was time to CAD then and 3D-print mounting brackets with suitable holding properties for the switches and bigger holes for the screws. Fresh out of the printer the parts were almost perfect fit but actually the fixing screws were even bigger than planned so a bit of drilling was needed.
At the same time work was also done on the electronics part of the task. This one would have been a bit easier had there been some proper connectors available but this simple makeshift connector might end up being the final solution for this. The electronics is simply a Arduino Leonardo with board to connect the switches. It would have worked without the extra circuit board but we thought it will make the connections a bit more rigid and also expandable. In the photo there are five switches soldered to the connector and that side is then ready.
The real gem is the actually controlling piece. Some switches installed and cables routed. This would have been easier with suitable router bit available but all we had were numerous routers and only a pair of bits. And no bits suitable for narrow grooves. The wires for the switches are constructed from two single lines and with the help of drill they are then formed nicely into a twisted pair. We could have used proper cable had we had any. Note the groove across the sheet and also the grooves on the side. Cable is then hot glued into the groove for it to stay put nicely.
Software was actually a bit surprising. We thought there would be Internet full of suitable examples and codes of this type of implementation but actually there were none. The arduino joystick library did help but directed to wrong direction. Now after coding the controller there seems to be a great example code of that. Our code can be seen at the bottom.
It started to be a bit late but as the project was in a good phase and the end was visible there was no problem finishing the project into a demo phase. There had been a little interfacing miscommunication so the pins were routed to completely different order and in almost the same pins but with the help of game controller diagnostics it was really simple to fix it in the code.
The hard part was then to find a game to play. The original plan was to play Arkanoid but that proved to be a bit difficult with the first Arkanoid we found. The second game was more of a Super Mario like and easier to handle with the controller.
- Github https://github.com/vaasahacklab/bar-stool-controller (arduino code & micro switch mount)
Next we need to finish the project and make it look nice – and find a game that is playable. Most important, it works and it was done in a day.