Skip to content

PlateComponent

Airyl Suaidi edited this page Sep 9, 2024 · 17 revisions

Table of Contents

Introduction

Coding

   UML

   Usage Summary

   Description

   Coding Choices

   Introduction

      Inspiration and Theory

Introduction

The PlateComponent is game component designed to manage the behavior of plates within the game environment, inspired by mechanics from games like Overcooked. This component allows plates to be picked up, washed, and used to hold items, mimicking Overcook plates behavior. The PlateComponent is interactable.

Key functionalities include:

   •	Spawning stack of plates with quantity.
   •	Spawning individual plates with id.
   •	Spawning plates with meals
   •	Despawn (dispose) plates.
   •	Handling the state of the plate (clean, dirty, being washed).
   •	Managing the addition and removal of items on the plate.
   •	Manage interactions to get plates from stack of plates.

Here and there will update soon

Coding

UML

Below is Rough UML Diagram of related components of the PlateComponent for reference.

UML DIagramPlateComponent

Usage summary

To spawn a stack of Plates with quantities. Just do as below:

Entity newPlate = PlateFactory.spawnPlateStack(quantity);

Calling this will spawn the PlateStack and users are able to interact with the plateStack to get plates.

To spawn a single plate simply use below:

Entity newPlate = PlateFactory.spawnPlate(id);

Users need to provide id to spawn plate to act as identifiers for the plate.

When getting plates from stack The head of the Array stack will be the id.

For example,

plateArrayStack[1,2,3]; plate.pickup(); plateArrayStack[2,3];

id = 1 will be removed from the stack and will be the id of the plate that was pickedup().

Description

Here and there will update soon

Coding Choices

Here and there will update soon

Inspiration and Theory

The design of the PlateComponent is inspired by the game Overcooked, where players must wash, serve and work around the limit of the plates. Plates are interactable in Overcooked.

As per picture below we can see plates are can be stacked and can be put on benches. In game it can be interacted by pickup or letdown.

image

The PlateComponent follows the ECS pattern, where behavior is defined by components attached to entities. This decouples functionality and allows for flexible and reusable game mechanics.

The plate’s state transitions between DIRTY, CLEAN, and WASHING, each state triggering different interactions and constraints.

Here and there will update soon

  • Papas Pizzeria && Overcooked

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally