Finalized Concept
For my final project, I’m making a croissant baking game, where the player goes through the actual steps of making a croissant: pouring the ingredients, rolling the dough, folding in the butter layers, shaping, and baking.
Each step is its own phase in the game. For pouring, the player tilts a little physical prop (I’m thinking a cardboard flour bag) over a bowl on screen. For rolling, you move your hand closer or further from a sensor to control how much pressure you’re applying to the dough. For the butter folding, you flip a switch left or right to match a sequence on screen, which is actually the thing that makes croissants flaky in real life, so I thought it was a fun mechanic to recreate. Then there’s a shaping phase with the mouse, and finally a baking phase where you manage the oven temperature with a potentiometer. At the end you get a croissant tier rating.
Arduino
The Arduino handles all physical input for the project. It reads three sensors and sends their data to p5 over serial communication continuously.
The first sensor is a tilt sensor (SW-520D), which is digital and simply reads HIGH when upright and LOW when tilted. This controls the pouring phase: when the player tilts the sensor, the ingredient starts flowing on screen, and when they straighten it, it stops.
The second sensor is an ultrasonic sensor, which measures the distance of the player’s hand in centimeters. This controls the rolling phase. Close distance maps to heavy pressure, far distance maps to light pressure.
The third component is a slide switch, which reads HIGH or LOW depending on its position, and controls the fold direction in the lamination phase.
The fourth component is a potentiometer, which has a numerical value representing the oven temperature.
The Arduino sends all four values as a single comma-separated line formatted as: tilt state, switch state, distance, pot value.
I am thinking of using LED lights when the croissants are baking in the oven. The red LED light turns on while they are baking, and the green LED turns on when they are done.
p5
p5 is the main visual and game logic system. It reads the serial data from the Arduino, parses the three values, and uses them to update the game state in real time.
Each of the five game phases is managed through a state machine, so the sketch knows which phase is active and which interaction to listen for. During the pouring phase, if the tilt value is LOW, an ingredient fills up on screen at a steady rate. During the rolling phase, the distance value gets mapped to a pressure level that flattens the dough visually. During the lamination phase, the switch value is compared against a generated sequence of prompts and scored accordingly. The shaping phase is handled through mouse and keyboard input directly in p5 without needing the serial data. And then, the baking phase needs the pot value reading from Arduino for the oven temperature.
Visually, each phase has its own screen with animations that respond to the physical input. At the end, a results screen shows the breakdown of each phase score and the final croissant tier.
Current Progress
My biggest progress so far has been finalizing the concept because I really struggled with thinking of something personal and fun.
I asked Gemini to create some visuals for my project. I wanted it to have a Parisian/Ratatouille theme.
Using the Stipend
I found the tilt sensor I need to order on Amazon and will be ordering it today. I also need to a buy a better potentiometer to make it easier to control it. I also want to buy some props such a cutting board and a rolling pin to make a more realistic experience.
