Making of

Showing how the cooking station works and how it was made is an important part of opening up this whole game making process. I hope this inspires ideas on how to change the controller and the game or how to go about creating different devices. It is not a tutorial or a guide on how to build, but I hope the overview is detailed enough to spark ideas and serve as a starting point. Also, if you would like to know more about how the game was done, please contact me.

The setup

The  main setup of the game’s hardware involves:

  1. A PC running a Unity game executable,
  2. A computer monitor,
  3. A webcam attached to the top of the screen,
  4. The cooking station controller.

The cooking station

The cooking station controller involves quite a lot of different parts and materials. To give a general overview, here is a list:

  • 1x Acrylic panel (24 x 12 inches)
  • 1x 12mm thick plywood (a total of about 36 x 36 inches)
  • 1x ¼ inch wooden dowel
  • Approx. 10 by 15 inches of black Worbla
  • A bunch of screws
  • 3x metal inserts and screws for that
  • 1x Water tap handle
  • 1x Numbered knob
  • 4x Push buttons (momentary, with LEDs)
  • 1x Rotary encoder
  • 1x On/off switch
  • 1x Small breadboard for wiring
  • A bunch of jumper wires
  • 1x Arduino Mega electronic board

Construction of the case

The case basically consists of a wooden case with a top panel made of acrylic. The wooden sides were fixed together with glue and nails. I added a few blocks to the corners as reinforcements and to fit metal inserts. This way, the bottom can be removed with screws without damaging the wood. One of the corner blocks also serves as a support for the knife pivot (more on that later).

The top was cut with a laser cutter from 3mm thick black acrylic. In this cut i included the marking for other hole that would be drilled later and already cut the shapes that were more elaborate, like the slits for the ingredient reader and the knife. The two front corners are curved. After the sides were glued and nailed together, I sanded the front corners of the wooden box to match the top panel.

Pot system

The basic parts are the pot, a disc, a dowel for the spoon handle and the encoder component.

The pot itself was made using a cardboard round box, covered with Worbla thermoplastic. After covering the box from the outside, I made another loop with plastic on the inside, to make the whole thing stronger and smoother. To make the pot handles, I sculpted the shapes with foam and covered them with Worbla. They got a bit messy, but are working ok.

The disc was also laser cut in the same acrylic as the top panel. I drilled a hole in the center for the main axis and a hole near the border, to fit the spoon handle in a way that it can spin. I fit the spoon through the hole, holding it with some elastic band in the bottom and a bit of Worbla on the top side. The whole disc and spoon contraption is then fixed to the encoder main axis, so it can spin freely.

Chopping knife

The knife shape was cut from acrylic, leaving space to later drill a hole for the pivot. The pivot was then screwed to one of the block corners. The edge of the knife is aligned with the slit in the top and the part closest to the handle hits a microswitch, like the ones used in arcade buttons. The microswitch was glued in place with some epoxy. This way, the microswitch gets activated only when the knife comes down. To make sure that the knife goes back up after each chop, A spring was attached to the knife and one of the side panels.

As part of the chopping system, there is also a pushbutton to the left side of the knife, which acts as a “safety” button: the chop is only valid when both the safety button and the microswith are activated. Players then have to use two hands to complete this action.

Water tap / Heat knobs

Both the water tap and the heat knob are basically potentiometers that stick through the top panel. They are fixed to the top using nuts and some epoxy. The heat knob is then fixed to the potentiometer using the a tiny screw, which is the standard way of attaching it.

The water tap had to be fixed in a more specific way, because it is made to fit into sinks. I cut a dowel and fit it inside. I then drilled a small hole in it to attach the potentiometer by pressure.

Ingredient reader and ingredient “chips”

The ingredient reader is a 34-pin edge card connector. It is very similar to a cartridge slot and it connects to the board via a flat ribbon cable. I use the contacts on one side of the edge connector as grounds and the other side as inputs. This way, if I create some kind of connection between the two sides (by inserting a chip, for instance), I get a specific combination of pins. This is the basis for how the ingredients work.

Each ingredient “chip” is an acrylic rectangle, with a thickness of 1.5mm to fit in the edge connector. I put some aluminum tape in the bottom on both sides of the plastic. This creates the connection between the two sides of the cartridge, which sends the board a pattern for this ingredient.

Setup of the board / electronics

The board that controls and interprets all the different components is an Arduino Mega. I chose this board because of the number of different pins. Each input in the game basically needs one pin for itself, and the ingredient reader alone uses 34 pins, half as inputs and the other half for grounding. The full list of pins used by the game is below.

int ingredientPinsList[8] = {22, 26, 30, 34, 38, 42, 46, 50};
int AddToPotIn = 20;
int AddToPotOut = 21;
int ServeIn = 9;
int ServeOut = 11;
int OverlayIn = 10;
int OverlayOut = 0;
int RebootIn = 12;
int RebootOut = 13;
int HeatIn = A0;
int WaterIn = A0;
int KnifeChopIn = 7;
int KnifeSafetyIn = 3;
int StirPinA = 40;
int StirPinB = 41;

There are 2 potentiometers in the setup, 4 buttons with LEDs (this is the reason for all buttons having in and out pins), one microswitch, one encoder, and one on/off switch in the back. I am using a small breadboard for creating a ground plane for all the components and organizing things, while the input and output pins are directly connected to the Arduino Mega.

Communicating between Arduino and Unity

The controller sends information to Unity, the engine in which the game is made, via a serial port connection. For handling this process, I am using an open-source library called wrhml. In the opening scene of the game, the software waits for the connection to be established and after that it reads a series of strings sent by the controller and parses them into commands for the different inputs of the game. Some of these connect like events (discrete, one-time actions like chopping of releasing a button) and others are more continuous, like the heat knobs or updating which ingredient is selected.

Testing the game and the story by waiting every time for the connection could be slow sometimes, so I created a keyboard-version of the game inputs. This allows for quick tests of the game writing and sequence of actions without carrying the cooking station around. Having a quick and easy way to test the game’s scenarios is key for supporting modding and other creation practices around it.