Blog Home

HOT SWAP: All Hands on Deck!

Arduino TeamFebruary 25th, 2019

Interactive video games take many forms, but for the most part, each player has a separate controller that manipulates an onscreen character, vehicle, or other singular element. What if, as in real life, multiple players have to work together with physical objects to control a sailing ship?

That’s the idea behind HOT SWAP: All Hands On Deck by Peter Gyory and Celment Zheng. In it, two players guide various parts of a ship using five different control elements. What makes this really interesting is that each player’s input device has room for two of these control elements, which must be swapped for actions such as steering and to load cannons. Input information is passed to the game via an Arduino Micro

It’s like if we took a regular game controller, popped off all of the inputs, and made it so you could only use a couple of them at a time. There are two controllers, with each consisting of two input slots. Each controller controls one side of the ship, port or starboard. There are five actions total in the game, each executed with a dedicated physical input: a crank to raise and lower the sails, a wheel for turning the rudder, a hatch for loading the cannons, a wick for firing the cannons, and a flame button for dousing the fire.

There is only one of each input, which makes them a shared resource that players must trade back and forth as they play. There is this old Milton Bradley kids board game from the ’90s called Perfection where players must fit shapes into holes before a timer is up and the board shakes to make everything pop out. HOT SWAP is like if Perfection had a screen attached and had a goal outside of putting shapes into slots.

All of the code is done with JavaScript and the library Three.js, which we bundle into a desktop application using Github’s Electron. The brain of the controller is an Arduino Micro, which mostly just passes data along.

The inputs are created with the Mechamagnets technique that Clement has been developing through his research; all 3D-printed in PLA with neodymium magnets embedded in them. The actual “hot swapping” is facilitated by pogo pins that line up with our custom PCBs for each input. Also, lots of chocolate croissants.

More details on the build are available via this interview as well as in the video below.

Boards:Micro