STAGE 2-1
TUTORIAL-BASEDPROTOTYPE

Kitchen Chaos

RoleGameplay Programmer
Timeline2024 – 2025
PlatformUnity 3D (URP) · PC
Team Size1 (Solo)
UnityC#URPScriptableObjectsNew Input SystemCinemachine
STAGE 2-1 // GAMEPLAYKITCHEN CHAOSUnityC#URPScriptableObjectsNew Input SystemCinemachineSYSTEM_INIT: OK | MEMORY: ALLOCATED | RENDERING: ONLINE

Mission Brief

Implement a fast-paced 3D cooking loop in Unity where players chop, fry, plate, and deliver multi-ingredient recipes under a 100-second round timer, using decoupled C# event architectures and data-driven ScriptableObject assets.

Key Systems Engineered

Polymorphic Counter Hierarchy (BaseCounter + 7 Station Subclasses)

Defines virtual Interact(Player) and InteractAlternate(Player) contracts overridden independently by ClearCounter, CuttingCounter, StoveCounter (running its own 4-state Idle -> Frying -> Fried -> Burned machine), ContainerCounter, PlatesCounter, TrashCounter, and DeliveryCounter — eliminating centralized type-switch dispatchers.

ScriptableObject Data Pipeline & Decoupled Event Bus

Authors all ingredients and state transitions as Unity assets (KitchenObjectSO, RecipeSO, CuttingRecipeSO, FryingRecipeSO, BurningRecipeSO). UI and audio subscribe to instance and static C# events, paired with a dedicated ResetStaticDataManager that explicitly clears static event delegates on scene reload to prevent memory leaks.

CapsuleCast Axis-Sliding Movement & JSON-Persisted Input Rebinding

Player.HandleMovement() uses Physics.CapsuleCast and decomposes blocked diagonal movement into single-axis (X or Z) wall-sliding. GameInput wraps Unity's New Input System with runtime keyboard and gamepad rebinding persisted to PlayerPrefs as JSON.

Scope Discipline Note

Base Template: CodeMonkey Unity Tutorial Series

Provided by Base:

  • Core visual assets, kitchen prefabs, and foundational tutorial gameplay loop structure.

Engineered by Me:

  • Full C# implementation of the 8-class polymorphic BaseCounter hierarchy, independent StoveCounter 4-state machine, ResetStaticDataManager scene-reload memory-leak fix, CapsuleCast single-axis wall-sliding math, and JSON-serialized Keyboard + Gamepad runtime input rebinding.

Implementation Details

Architecture & Deep Dive

Kitchen Chaos implements a cooking simulation where every station type inherits from BaseCounter and overrides interaction contracts independently. The StoveCounter runs its own 4-state machine (Idle → Frying → Fried → Burned) with timer-based transitions.

All ingredient definitions and recipes are authored as ScriptableObject assets, making the game fully data-driven. The ResetStaticDataManager ensures static C# event delegates are properly cleared on scene reload to prevent memory leaks — a common pitfall in Unity projects using static events.

Player

Your class determines which skills and projects are highlighted.