Tina's ITP Blog

ITP Blog

Food Wars: Killer Utensils

game-demo-screencap.gif

For my final Fast Fun: Physical Controllers class, I created a simple game on Unity with a physical knife and fork as the controllers.

IMG_6417.JPG

Originally, I designed the game so that the fork’s and knife’s jobs were to jump to catch various food objects that are floating at the top of the screen. Touching the physical knife and fork to the pad would make the utensils jump.

Screen Shot 2564-05-04 at 18.48.11.png

To add complexity and challenge to the game, I decided to make the food items fall for the utensils to shoot to collect score. Each physical utensil tap to the pad will shoot a bullet out of the digital utensil.

The controller is made of two pieces of card paper, lined with copper tape and a circular-shaped tin foil middle to easily detect the tap from the utensils. The utensils themselves are conductive, so I simply used alligator clips to attach them to a pinout on my Arduino.

For the controller pad, I wanted it to resemble a plate to go along with the utensil concept. I used a bowl to outline a perfect circle of an appropriate size for a plate.

IMG_6238.JPG

I originally only taped a grid of copper tape throughout the entire pad to detect the connection, but after playing the game a few times, I realize that the connection was too finicky due to the grid layout of the conductivity on the pad. I added circular-shaped tin foil in the middle of each pad to ensure the connection when the fork and knife are being tapped.

IMG_6420.JPG

To control Unity with my Arduino, I used the MidiJack library and set the two pins to a specific midi number (in this case 61 and 62). On Unity, I added scripts to the fork and knife game objects to detect the 61 and 62 midi inputs.

ArduinoZeroMidi code

ArduinoZeroMidi code

Unity script using MidiMaster to detect the midi number as input.

Unity script using MidiMaster to detect the midi number as input.

Each time the bullet hits a food item, the score ticker goes up by 1.

This is currently an initial prototype of the game. For future developments, I would like to add levels and give the utensils a health bar to give the player more challenge.

Credit to this YouTube channel for the Unity tutorials!