Skip to content
Jackson Van Duikeren edited this page Aug 28, 2024 · 12 revisions

Items

Overview

The items are one of the most fundamental part to most videos games. Within our game, these items will be used to display ingredient and used to make meals and give them to customers. These items are built through the entity-component system using an entity with multiple components which allows the functionality that we need.

How to create your own item

All of the spawning of the items should occur in ItemFactory where all items including meals and ingredients are spawned individually. Everything starts with a template Item creator which will add the component shown in the image to the empty entity image

If you want to create an item, you would create a method (example: createFish()) where you will need to call that template item creator function and add a texture render to load the image and Ingredient Component to give it some functionality.

image

If you want to add some items together to make a meal which will be servable to the customer, you will do the same thing as an item however use a meal component to give the functionality a meal requires. To get more info on how meal and ingredient component differ, refer to the UML diagram furthur below in the document image

Components

image The item you want to create will either be a meal or ingredient for the meal.

ItemComponent

The item components is a template class which has very basic functionality and is utilized by meal and ingredients for it's simplicity. It consist of a randomly generated ID, a name, weight and type. There are getter for all these however no setter as these function should not be changed after initialized.

IngredientComponent

The IngredientComponent is a child of the ItemComponent which will be used for all individual food items which will be used within the game. It can be defined to be chopped and/or/neither cooked and can be altered through the many methods available. Refer to UML for full list

MealComponent

The MealComponent is also a child of the ItemComponent which will be used to combine all individual IngredientComponent to make a central dish which can be served to customer. This allows meals to have ingredients added and taken away at a basic level and have a set price. The quality will be calculated through a calculateQuality() function which will access each individual item's state to determine how each items quality is and the total quality at the end.

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