ChefDash structures its challenge around 20 distinct kitchen levels, each defined by how many orders the player must complete, which ingredients are available on the board, a set of possible recipes, and a countdown timer. The first three levels are hand-crafted with curated ingredients and recipes; Levels 4 through 20 are procedurally generated at launch so difficulty scales smoothly without manual tuning. Completing a level with at least one order served unlocks the next level and records a star rating in memory that is displayed on the map.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ImLukzy/ChefDash/llms.txt
Use this file to discover all available pages before exploring further.
The Level Struct
Every level in the game is represented by a single Level value type defined in Models/Level.swift:
Field reference
Field reference
| Field | Type | Description |
|---|---|---|
id | Int | Unique level number; also used to calculate which level to unlock next. |
name | String | Human-readable name displayed on the map node and in VictoryView. |
targetOrders | Int | Minimum completed orders needed to achieve at least 1 star. |
availableIngredients | [String] | The ingredient emojis shown on the tappable grid during a round. |
possibleRecipes | [[String]] | Pool of recipes; one is picked at random for each new order. |
baseTime | Int | Starting timer value in seconds when a round begins. |
isUnlocked | Bool | Mutable; set to true by finishRound(starsEarned:) on the subsequent level. |
starsEarned | Int | Mutable; tracks the player’s best rating for the current session (0–3). |
Hand-Crafted Levels
The first three levels are authored by hand insetupLevels() with fixed ingredients and recipes designed to onboard new players gradually.
| Level | Name | Target Orders | Ingredients | Timer |
|---|---|---|---|---|
| 1 | Burger Station | 3 | 🍞 🥩 🧀 | 40 s |
| 2 | Green Diner | 4 | 🍞 🥩 🧀 🥬 🍅 | 45 s |
| 3 | Bacon & Grill | 5 | 🍞 🥩 🧀 🥬 🍅 🥓 🧅 | 50 s |
isUnlocked: true; Levels 2 and 3 start locked and require the player to earn at least one star on the preceding level.
Procedural Generation (Levels 4–20)
Levels 4 through 20 are named"Kitchen Arcade Expo N" and are generated at app launch using three scaling formulas applied to the level index i:
Scaling Formulas
Ingredient Count
min(5 + (i / 5), 8)Grows from 5 at Level 4 toward the full pool of 8 by Level 20.Target Orders
4 + (i / 2)Level 4 requires 6 orders; Level 20 requires 14 orders.Base Timer
max(30, 55 - (i * i / 15))Drops steeply in the mid-game. Floors at 30 seconds from Level 16 onward.The Ingredient Pool
All 8 ingredients used across the game, in pool order:Recipe Validation
Every ingredient tap passes throughaddIngredient(_:) in GameState, which performs strict positional matching:
triggerError(), which resets the combo multiplier to 1, flashes the error overlay, and clears currentBurgerStack after 0.8 seconds. Additionally, RecipesView deducts 3.0 seconds from the timer locally when it detects a wrong ingredient before calling addIngredient.
Positional check
Each element of
currentBurgerStack is compared at the same index in targetRecipeEmojis. The first mismatch triggers an error immediately.Completion check
If the stack length equals the recipe length and all positions match,
triggerSuccess() is called.Star Rating Logic
When the timer hits zero inRecipesView, the star count is calculated and passed to finishRound(starsEarned:):
| Condition | Stars |
|---|---|
completadas >= targetOrders | ⭐⭐⭐ |
completadas >= max(1, targetOrders / 2) | ⭐⭐ |
completadas > 0 | ⭐ |
completadas == 0 | (none) |
VictoryView to render the three star icons on the results screen.
Level Unlocking
finishRound(starsEarned:) runs on the main queue after every round. It records the best star rating in memory and unlocks the next level by ID:
A level is only unlocked when the player earns at least 1 star (
starsEarned > 0). Completing zero orders — running out of time immediately — leaves the next level locked. Star ratings are tracked as the in-session best: replaying a level with a lower score will not overwrite a previous high within the same session.