-
Notifications
You must be signed in to change notification settings - Fork 2
PlateComponent
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 Overcooked 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
Below is Rough UML Diagram of related components of the PlateComponent
for reference.
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()
.
At the start of the game plates will be spawned in stacks (for now stack = 5) like below:
Focusing on the plates:
PlateComponent
handles plates in the game, it is being initialized in ForestGameArea
which will create a plate stack and display it in the grid, in the kitchen. The plate stack can be interacted with using key 'E' whenever SensorComponent
detects it is nearby. The Plate can be spawned as a stack entity or also spawned as a single entity.
Entity Component System
is utilized for the code to be rendered on screen and also backend. The PlateComponent
extends Component
as it was added to an entity and is able to use .addComponent()
to register Physics, Collider, Hitboxes, toolTips and etc. PlateComponent
itself is a component and is being registered to EntityService
. RenderComponent
also is used to render textures of the plates. Also, integration with PlayerActions
to identify it as an interact().
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.

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.
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
Entities and Components
Input Handling
Game Screens and Areas
Fire Extinguisher Handler Component
MainGameActions Create Docket Triggers
Main Game Order Button Display
BackstoryCutsceneDisplay Test Plan
Test Plan for MainGameOrderTicketDisplay
Test Plan for MainGameOrderBtnDisplay
Test Plan for DocketLineDisplay
Test plan for RandomComboService
Test plan for SpeedBoostUpgrade
Test plan for DancePartyUpgrade