Concept & User Interaction
Choosing a dish in the restaurant is always difficult, especially if you have food allergies or follow a specific diet. Inspired by the photograph of a long dining table (Figure 1) and a scene from Ralph Breaks The Internet with a “Bunny Pancake Kitty Milkshake” video game (Figure 2), I decided to represent how complex it can be for the server to manage the flow of orders and requests.
My game features two people sitting on the opposite sides of a long dining table. Each person has their own preferences in food, which update several times – e.g. vegetarian, vegan, meat-based dishes. Depending on their preferences, the player has to use two plates on the table to catch appropriate dishes that are falling on the table and serve them to the visitors. The customised background music was created using I Miss My Cafe website, where I set up the volume of different actions, so that the sound would mimic the restaurant environment and the experience would be more immersive for the user.
Figure 1: Nissa Snow, n.d., https://ru.pinterest.com/pin/697635798561628823/
Figure 2: Slash Film, 2018, https://www.slashfilm.com/562530/ralph-breaks-the-internet-easter-eggs/
Highlight of the code
When working on the interactive part, I have spent more time than expected on creating the classes for the Plate and the FallingDish. Movement of both types of objects are dependent on the actions of the user, so I decided to implement mousePressed(), mouseReleased(), mouseDragged(), and define my own functions to control the interdependence of moving objects.
function mousePressed() { // checking if the mouse is over a plate for (let plate of plates) { if (plate.isMouseOver()) { plate.isDragging = true; plateDragged = plate; break; } } } function mouseReleased() { // the plate stops moving when the mouse is released if (plateDragged) { plateDragged.isDragging = false; plateDragged = null; } } function mouseDragged() { // dragging the plate with the mouse moves it if (plateDragged) { plateDragged.move(mouseX); } }
Sketch
Uncertainties & Complexities
Since this sketch is the prototype of the final game, I have used simplified graphics, with geometric shapes symbolising the dishes and without the visitors’ figures. In the future development, I will import my own illustrations of the dishes and figures of people.
For now the main unresolved challenge is related to the release of the dish when the plate approaches the end of the table. I did not manage to come up with an algorithm that would make the shape disappear, as if the person consumed it, when the user drags the plate to one side of the table, so I plan to continue research and sign up for an office hour with the professor to discuss possible solutions.
Risk Reduction
By relying on the general concept of an existing popular video game, I ensure that the playing mechanism of my mini game is not confusing for the user.
The most challenging part was to implement the collision detection mechanism in order to make the falling dishes (represented as a triangle and a square in this prototype) stick to the plates when caught. I will continue working on the look of the plate with the dish on it, changing the location of the figure.