General Stations Overview - UQcsse3200/2024-studio-3 GitHub Wiki
Introduction
The stations in the game are the components which the character can interact with items which are held in their inventory. Stations can hold items that the player gives to it, but certain stations can only hold certain items. These stations are heavily inspired by Overcooked. Below is a general architecture of of station system, note that StationItemHandler represents the generic for several other similar components
Types of Stations
For now, we have 9 stations, but may add more as development continues
Bench
Allows the user to place items down, click J to attempt to combine ingredients, K to rotate items to select one to take
Oven
The oven station will allow the user to cook items such as roast vegetables, must leave item in station for set time to see item updates
Stove
The stove station will allow the player to place either a frying pan or a pot for frying and/or boiling ingredients. Must leave item in station for set time to see item updates
Fridge
This collection station will allow the user to collect, and store items which require refrigeration. This may include items such as meat or chocolate.
Produce basket
This collection station will act as storage for fresh produce that the player can pickup and place back down if required. This could include items such as bananas, lettuce, or cucumbers.
Chopping board
This station will allow the player to cut up ingredients to a suitable size dependent on what is required for the recipe. The primary use of this will be cutting fresh produce for salads or smoothies. must leave item in station for set time to see item updates
Submission Station
The submission component is the station where the player can submits an item which will be marked against the criteria given from the selected customer. This station used an animation to clearly identify where meals need to be submitted by the player. The following sprite map was used:
Bin
Items not wanted by the player can be placed in here, and they will be removed from the game.
Fire Extinguisher
The fire extinguisher can be picked up by the player and used to put out fires created from stoves and ovens overheating.
StationFactory
Stations are defined within StationFactory.Java, this is where stations are created. This creation code is called in the ForestGameArea.java, which is where we spawn our entities.
Each station requires a set of components for it to function as required. Look at functions in StationFactory for examples of components, and for further explanation of them check the corresponding wiki pages, but the main ones are:
-
TextureRenderComponent
- this renders the image -
PhysicsComponent
&ColliderComponent
- this enables collisions with the station and hitboxes for interactions -
StationItemHandlerComponent
- which allows the station to interact with items -
AnimationRenderComponent
- this animates the station, if the station needs to be animated