Robot Invasion Hotline

Last weekend myself and my brother took part in SparksJam and came up with a weird little audio-only game that you control using a hacked together rotary dial telephone. The theme of the jam was 'Invasion' so the game is called Robotic Invasion Hotline. You can play the game on using keyboard controls - or you could build your own rotary dial telephone controller - read on!

A few people asked about how we made the project, so here's some notes on how everything works.

Also this project doesn't actually use Fungus, but I needed somewhere to put this blog post so here it is :)

A Fairytale beginning

We had a rotary dial telephone from 1979 sitting in our attic for years and every time I saw it I thought it would be cool to get it working again and make a game with it. You can pick one up yourself fairly cheap online.

I started out by finding this great Fairytale Phone article, which describes making something similar using a Raspberry Pi & some Python script. For our project, we used a Makey Makey board and Unity running on a Macbook Pro. 

The Makey Makey is a hobbyist board that lets you quickly build game controllers from anything that conducts electricity - including things like your own body and fruit! Rotary dial telephones also work very simply by opening and closing the circuit on a few wires.

There's no point repeating the steps in the Fairytale Phone article above, so I'll focus on what we needed to do to make it work with a Makey Makey & Unity.

Cut the blue wire

The nice thing about old devices like this is that they were designed to be easy to repair. The whole casing is held on with just 2 big screws and all the wires are easy to access and plug in and out.

When you open up the phone, the first job is to figure out which wire does what. There are 3 circuits (pairs of wires) in particular that you need to find. I have no idea what the proper names for these circuits are so I just made up my own :)

  1. Handset Active: Off when the receiver is sitting in the cradle, and on when the receiver is picked up.
  2. Dialler Active: Off when the dialler is at its resting position. On when you turn the dial to dial a number.
  3. Number Active: On while Dialer Active is on, but pulses off when the dial passes a number on the way back to the resting position. Basically, if you dial '4' then you'll get 4 off pulses. Dialling 0 actually generates 10 off pulses because of the number layout on the dial.

Plug the Makey Makey into your computer and try isolating a pair of wires at a time to identify each circuit. Connect one wire of the pair to Earth on the Makey Makey and the other wire to any of the input contacts. When a circuit closes (e.g. as you pick up the receiver) the LED on the board will light up for that input, letting you know you've found the right pair of wires for that circuit. Repeat until you've found all 3 circuits listed above. 

The headphone jack and red USB cable plug into the laptop

The headphone jack and red USB cable plug into the laptop

The funniest bit is watching people under the age of 25 trying to work out how to use it

The funniest bit is watching people under the age of 25 trying to work out how to use it

Wire it up

Once you've identified those 3 circuits you then need to wire them up to any 3 inputs on the Makey Makey. If you look carefully at the picture below you might notice that I used some industrial grade Xmas Selotape to connect the wires from the phone to a bunch of other wires which run to the contacts on the Makey Makey. It's a total mess, but hey it works.

Possible fire hazard - ho ho ho!

Possible fire hazard - ho ho ho!

I still don't know what those yellow wires do

I still don't know what those yellow wires do

Once you've wired everything up correctly then you should be able to see the 3 input LEDs on the Makey Makey light up and pulse as you pick up the receiver and dial in a number.

Like in the Fairytale Phone, I simply connected the wires from the speaker in the receiver to a chopped up old headphone jack and plugged it straight into the headphone socket on the Macbook. Worked great!

Codey Codey

We wanted to have a crossed line bit where an angry Portuguese person shouted insults at you but ran we out of time sadly. Next time Joao!

We wanted to have a crossed line bit where an angry Portuguese person shouted insults at you but ran we out of time sadly. Next time Joao!

With everything wired up, it was time to write some code in Unity to read the signals from the Makey Makey.

The Makey Makey basically pretends to be a keyboard, so when a circuit closes you get a keypress event on the computer.

As an aside, if you open a texteditor you can use the Makey Makey as a really crappy keyboard that can only write stuff like AWSDEFG. Handy.

In Unity you can use Input.GetKey() to check for the 'pressed state' of these keys. The trickiest part is correctly handling the sequence of signals that might come from the phone and translating them to gameplay events that you can use to build a game with. Bear in mind the player could hang up the phone at any time so it's important to be able to reset the gameplay as soon as this happens.

I used a Unity coroutine to handle this, take a look at the PhoneInput.cs script for the source code. I used another coroutine (in GameController.cs) to play the appropriate audio at the right time in the call based on the events received from the phone.

Can you hear me?

With the hardware side done it was time to write the story script and record some funny voiceover. Steve recorded my voice in a quiet room on a portable Zoom H5 with a shotgun mic pointed at me so as to mainly pick up my voice and not the room. We tried out some funny accents and got people to listen to the sound through the phone receiver. It took a while to find something that both sounded good and was easy to understand. We went with a slow robotic monotone in the end which worked well.

The raw voice recording was cleaned up using Izotope Rx4 software using the denoise utility to highlight and remove background noises/ambiences from all the audio which just leaves the clean vocal.

Not actually a shotgun

Not actually a shotgun

Steve composed the music as a cheezy Muzak version of 'Come Fly With Me' by Frank Sinatra, similar to music you would hear on hold or in an elevator. The robot voice effect was created using the Little Alter Boy plugin in SoundToys. The phone ringing and dial tone samples, recorded dialog and muzak were then brought into Logic Pro where they were arranged and edited in a linear form. From when you first pick up the phone to when you get your first choice is a single piece of audio. All the mixing was done in Logic Pro rather than in Unity.

Steve worked in some nice little details like the phone ringing after you have been put on hold and just before they answer. When you dial a number, the dial tone cuts out as the rotary phone passes each digit and the Muzak is ducked while the robot is speaking. Subtle things, but they make it feel more authentic. Finally, we felt the voice sounded a bit muddy through the speaker so we used an Audio Mixer in Unity to suppress the frequencies around 1000Hz which helped the voice come through clearer .

Thank you for calling - please hold

We were pretty happy with how everything worked by the end of the jam (which lasted 12 hours). The game got good laughs out of everyone who played it, which is what we were aiming for. With more time we would have added more interaction in the script, but we had to keep it very simple to meet the deadline. Maybe next time!

You can download the full source code for the game as a .unitypackage from (scroll down for the download link).

Any questions just ask in the comments section below, and if you like this project we'd appreciate if you gave the game a rating on - cheers!