Skip to content

CustomerSpawnController

AidenRichards03 edited this page Sep 12, 2024 · 1 revision

Customers created by Team 8

Description

The Customer Spawn Controller is made to be able to seamlessly spawn the correct customers with the correct configs. The controller uses listeners which are triggered by calls in the level system class. At a high level the spawn controller has listeners for each customer that can be called to be spawned. On that trigger the controller calls an appropriate method to spawn the respective customer. This customer is then created in NPCFactory using the configurations defined for that customer in NPCConfigs.java and NPCConfigs.Json.

Customer.JSON

Each customer will contain information rooted from a Customer.JSON file, within core/assets/images. Each customer contains several characteristics such as patience/wait time, food preferences (i.e. what the player will need to cook up to satisfy them), and a reputation meter. An example of one such customer file is seen below

"Hank": { "name": "Hank", "type": Gorilla "countDown": 20, "patience": 100, "preference": 0, "reputation": 100, "texture": "images/animal_images/gorilla.atlas" },

  • name: customers will have unique names for players to have easy identification
  • type: type reflects what animal the character is, which influences its food preferences and texture
  • countDown: timers to reflect how long each customer will stay that will be unique to each animal type. this is based on each customers patience level ie. countDown is the countdown of the patience level to 0
  • patience: timers to reflect each customers patience levels that will be unique to each animal type (this will be impacted if the player does not keep up with the order and/or if the player makes a moral decision)
  • preference: specific food preferences for each customer which will influence their orders
  • reputation: unseen reputation meter that tracks customer satisfaction and influences their behaviour in future interactions with the player (this will be impacted if the player does not keep up with the order and/or if the player makes a moral decision)
  • texture: placeholder images will be used to represent the design of each customer, allowing for future updates with actual character art and animation

Usage

PersonalCustomerEnums holds enum values for all of the customers. This ensures correct usage of the trigger. public enum PersonalCustomerEnums{ HANK, LEWIS, SILVER, JOHN, MOONKI, BASIC_CHICKEN, BASIC_SHEEP }

Within a file, spawning a customer can be done through ForestGameArea.getSpawnController.getEvents.trigger(PersonalCustomerEnums..name() where is the enum of the customer you are intending on spawning

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