Skip to content
TheChatArchiveThe Chat Archive
MiniMaxminimax-m3Hugging Face Arena WebDev Preferences (2026)

Build a polished, playable browser game: Game Idea - Cooking Game with a Skill Tree…

  1. User

    Build a polished, playable browser game: Game Idea - Cooking Game with a Skill Tree Progression. Make the core loop fun within the first ten seconds, with tight controls for both keyboard and touch, and juicy feedback — screen shake, particle effects, and satisfying animations. Include a start screen, a score system, pause and game-over states with instant restart, and a local high-score table. Style it with a cohesive visual theme and make sure it runs smoothly at 60fps on desktop and mobile.

  2. MiniMax Assistant

    I'll build a polished cooking game with skill tree progression. Let me start by exploring the project structure.

    Now I have a clear picture. Let me design the game architecture:

    Game Plan:

    • Title: "Chef's Quest" - Cooking game with skill tree
    • Core loop: Orders come in on a conveyor. Tap/click ingredients to add them to a pot. Match the recipe to complete the order. Earn coins → unlock skill tree nodes (speed, multistation, combo bonus, tip jar, etc.)
    • Juice: Screen shake on wrong/complete, particle bursts, satisfying animations
    • States: Start screen, gameplay, pause, game over (3 lives from wrong orders / timeouts)
    • Controls: Tap ingredients (touch/click) + keyboard 1-9 for ingredients, Space to submit, P/Esc to pause
    • Storage: localStorage for high scores + skill tree unlocks

    Let me build this with a single, well-structured file approach using React + Canvas-style DOM animations.

    Now let me add the Fredoka font to index.html and start building the game. First, the data/types module:

    Now the game store - a single state machine using React useReducer for predictable updates:

    Let me fix these type errors:

    Hmm, my edit didn't take. Let me check the current state of that section:

    Good. Now let me build the main App component with all the UI screens and the game loop. Let me create modular screen components:

    Let me fix the import paths - they should be ../data:

    Now the main game screen, start screen, and other UI screens. Let me build the gameplay first:

    Now let's build the Start, Pause, GameOver, SkillTree, and HighScore screens:

    Now the main App that ties it all together with the game loop:

    Let me try a build to see all errors:

    Build succeeded. Now let me play the game mentally and look for issues. Let me review the store logic more carefully, especially the order lifetime and submit logic:

    Now let me also look at and improve the game experience. A few issues I see:

    1. The lastRun in GameOverScreen won't reflect properly because the wrong-recipe branch's endRun is called on state (the original) not on the local updates.
    2. The order lifetime needs to feel snappy.
    3. The submit/wrong branch needs to use the locally-computed values like time/comboTimer for the game over transition.

    Let me also notice: when the game is over and we transition to gameover, the order positions need to be considered. Let me restructure the SUBMIT_POT to be cleaner and fix the order lifetime to be tighter (give orders 12-18s):

    Now let me also tighten the recipe times so the gameplay is faster and more responsive. The "patience" is in seconds, so let me look at the recipes:

    The recipes have patience from 18-32s. Given belt time of 14s, we want the recipes to time out roughly when the belt delivers them. Actually a simpler model: patience is independent of the conveyor display. The patience is the time you have to complete the recipe. Let me leave it as is.

    Let me also think about the "first 10 seconds" experience. Currently, the first order spawns at t=1.5s with patience 18-20s. That feels good.

    Now let me check a subtle bug: in ADD_INGREDIENT, the pendingDrop is set but never used. The currentPot displays it. That's fine, but I want to add some "drop animation" feedback. Let me look at the pot rendering:

    Let me also add a "drop" animation when an ingredient is added. I'll use a key on the latest item to retrigger the animation. The pendingDrop in state tracks it. Let me add the animation:

    Now let me improve the pot with a drop animation key tied to the count:

    Now, let me look at the game from a UX perspective. The current bottom panel with 4 stations each showing 3 ingredients is cramped on small screens. The "wide_station" skill adds a 4th ingredient per station. Let me also reconsider the visual layout - the bottom panel could be the entire bottom quarter with bigger ingredients. Let me also think about the playing experience - currently with 3 ingredients per station, players have 12 ingredients. For the first 10 seconds with just rice/egg/onion recipes, they need to find those.

    Let me check: with stations 0-2 having 3 each = 9 ingredients, plus station 3 having 3 (bread/cheese/herb) = 12. All recipes use only ingredients from stations 0-2 in the first 2 levels. So the third station (3) is bonus. Let me show it on the UI too, which I am. Good.

    But wait, on the first level, recipes are: fried_rice (rice, egg, onion), tomato_pasta (pasta, tomato, cheese). So players need rice, egg, onion, pasta, tomato, cheese. All visible. Good.

    Now let me also think about the "last run" issues. The game over happens in the TICK. The state passed to endRun should include updated time, score, coins, etc. Let me look at the tick more carefully:

    Good, that passes the updated time/score/coins.

    Now let me think about one critical issue: in the TICK handler, expired orders are computed from orders.map((o) => ({...o, timeLeft: ...})) but the orders that get expired are then removed. The remaining orders should keep their original spawnedAt so the visual position is correct. Let me check:

    Yes, the orders array after filtering still has the original spawnedAt. Good.

    But wait: the timeLeft of an order can never go below 0 since Math.max(0, o.timeLeft - dt). So if an order has timeLeft 0.5 and we tick 0.6 seconds, it becomes 0 and we mark it expired. But the visual position is based on state.time - o.spawnedAt. So orders can also "fall off" the conveyor. We need to make sure orders are removed if they fall off too. Let me add belt position expiry:

    I need to add the constant. Let me also export it:

    Now let me also think about another potential issue: the state.time only increments when phase is "playing". When the user pauses, time freezes. When they resume, time continues. Good.

    But the lastTimeRef.current = null in the App.tsx only resets on phase change to playing. So if the user pauses and resumes, the dt for the first frame after resume will be very large (capturing the pause duration). I need to handle that:

    Now I also need to add the useRef import:

    Good, useRef is already imported. Let me build:

    Build successful. Now let me think about visual quality. Let me reconsider the layout - the bottom 4-station grid with 3 small ingredients each is too cramped. The pot in the center bottom is fighting for space. Let me redesign: put the pot at the top of the bottom panel, and ingredient stations at the very bottom, in a single row of larger buttons.

    Actually wait - rethinking the entire layout. The most important things on screen are:

    1. The order tickets (what to make) - top half
    2. The pot (what's cooking) - middle
    3. Ingredients (the tools) - bottom

    Let me restructure the game area to be more spacious. Let me also remove the small keys labels for now and instead show a "key map" hint, or just show the key in the corner of each button:

    Let me redesign the game screen layout to be cleaner. Move the pot OUT of the conveyor area and put it in its own section above the ingredient panel:

    Let me fix App.tsx to not pass the unused prop:

    Build successful. Now let me think more carefully about the gameplay experience and visual polish.

    Issues to address:

    1. Visual hierarchy: The pot is currently w-48 with h-44 (192x176px). That might be too small on phones.

    2. The bottom 4 stations with small ingredients on small screens (iPhone, ~360px width) - 4 stations * 70px = 280px which fits but the buttons themselves are tiny. Let me use larger buttons.

    3. First 10 seconds: Make sure the first order arrives quickly with a clear recipe. The player needs to immediately understand "tap ingredients → serve".

    4. Order ticket visibility: Make tickets more legible on small screens.

    5. Pot readability: Make sure the ingredients inside the pot are visible.

    Let me think about the core gameplay. With 12 ingredients on screen + a small pot, it might be too cluttered. Let me reduce to 8-10 ingredients max, or make the buttons smaller. Actually, 12 is fine for variety.

    Let me also make a few quality improvements:

    1. A "tutorial overlay" that shows for the first 3 seconds of the first game
    2. Better visual feedback when ingredient is added (drop sound effect - using CSS only)
    3. A "preview" of the order in the pot - when player starts adding the right ingredients, glow green

    Let me also fix a subtle bug: when the user adds the same ingredient twice (e.g., adding "tomato" then "tomato" for a recipe that needs 2 tomatoes), the current system doesn't support it. But looking at my recipes, none require duplicates. So this is fine.

    Let me also think about a critical thing: a great game must feel responsive. Let me check the dispatch chain:

    • User clicks → ADD_INGREDIENT → state update → re-render with new pot → animation

    React batches updates. The TICK happens 60fps via RAF. The dispatch from click is also a re-render. Should be fast.

    Let me add a "glow" effect to the pot when ingredients are correct. I'll add a check in the Pot component for the current orders:

    Now let me also think about visual feedback. Let me add a "score floating" + a "combo" display when combo is high. Also, I want to fix a visual issue: the bottom ingredient panel uses flex-row on mobile (4 columns of 1 button each) which would be too wide. Let me re-check the layout:

    Actually wait, I had it flex-col originally which makes each station a vertical column. With 4 stations × 3 ingredients = 12 ingredients in a grid of 4 columns × 3 rows. That should be fine. Let me re-look:

    Let me simplify: always use flex-col (column within each station). On mobile, each station is 1/4 of width, with 3 small buttons stacked vertically. That might still be tight. Let me reconsider - I should make the ingredient buttons bigger to ensure touch targets are ≥44px.

    Let me redesign the bottom panel to use a different layout. Instead of 4 columns of 3, use a single row of larger buttons, and put the keyboard hint in a hover tooltip or a small letter at the corner:

    Now let me also make the ingredient button "size sm" be a bit bigger:

    Let me also reconsider the OrderTicket - it's 36-40px wide which should be visible. Let me build:

    Good. Now let me also think about additional UX improvements:

    1. First-time tutorial: Show a brief "How to play" overlay on first game
    2. Audio feedback: Add simple Web Audio API beeps for actions (since user wants "juicy" feedback)
    3. Order ticket click-to-serve: Tapping an order ticket should auto-fill the pot (great UX)

    Let me prioritize: the order-ticket tap-to-serve would be a HUGE quality of life improvement. But that conflicts with the keyboard model. Let me skip for now.

    Let me add audio feedback using Web Audio API. This is what makes the game "feel" alive:

    Now let me integrate audio into the game. The cleanest way is to play sounds in response to state changes. Let me use an effect that watches for specific transitions:

    Now let me also add the success sound when serving. I can do that via a separate effect watching the orders count:

    Build succeeded. Let me now consider an important UX detail: when the user wants to add an ingredient, they need to see the current pot contents clearly. The pot might be too small to see ingredients clearly. Let me make the pot bigger.

    Also, the visual feel of the game depends heavily on the background music ambiance or just the satisfying sounds. Audio is a big part of the "juice".

    Let me also reconsider the recipe system. I want to make sure the first recipe is super easy and discoverable. The first order to appear is pickRandomRecipe(1, ...) which is a weighted random. With fried_rice and tomato_pasta both at level 1, with weights 1.0 each, it's 50/50. Let me make it favor the easiest recipe:

    Now let me also add a couple more important details:

    1. First order should be very obvious - add a glowing/pulsing border on the first order
    2. A "score ticker" animation in the top
    3. Make sure the order's required ingredients are clearly visible

    Let me also add a "hold-to-clear" feature: long-press the pot to clear. Or maybe a "trash" button is enough.

    Let me now think about layout issues on small phones. With iPhone SE (375x667), the layout:

    • HUD: ~50px
    • Conveyor: ~280px
    • Pot area: ~150px (with serve/clear buttons)
    • Ingredient grid: ~140px (4 rows * 48px + padding)

    Total: ~620px, which fits in 667px. Tight but OK.

    Let me think about iPhone with notch. The 100dvh should handle the safe area. Good.

    Let me also make sure the order tickets are visible. They're 36-40px wide. With pos going from 1.15 (off-right) to 0.15, they spend most of the time on screen. Good.

    Now, one last critical thing: the first 10 seconds - what does the player see?

    • t=0: Title screen with "Start Cooking" button
    • t=0.5: Game starts, HUD shows lives, score 0, coins 0, level 1
    • t=1.5: First order slides in (Fried Rice: rice, egg, onion - all from stations 0, 2, 1)
    • t=2.5: Player can tap rice, egg, onion → see ingredients drop into pot with bounce animation + drop sound
    • t=4: Player hits "Serve" → success chime, +30 coins, score +45, particles, combo, "Level 1!" floats

    That's great.

    But wait - the conveyor is on top, but the ingredient selection is at the bottom. The player needs to glance at the recipe on the ticket, then find the right ingredients. Maybe I should add a "preview" of the next ingredient needed.

    Actually, let me reconsider. The whole point is to make players remember/match patterns. Adding too much help makes it trivial.

    Let me now think about one more critical issue: when the player submits the wrong recipe, they lose a life. But if they're adding ingredients one by one, they should be able to fix mistakes. The "Remove from pot" (tap ingredient in pot) feature handles this. Good.

    But the "Clear" button is also useful. Both are there.

    Let me also think about the visual quality of the menu. The menu has 4 buttons (Start, Skill Tree, Scores, How). That's enough.

    Let me also add a small "new run" indicator on the menu and total coins/best. Already there.

    Let me now also think about polishing the OrderTicket - it should be clearly visible, and the recipe emoji pattern should pop. Let me look at it:

    Files built: index.html, src/index.css, src/game/data.ts, src/game/store.ts, src/game/components/Pot.tsx, src/game/components/IngredientButton.tsx, src/game/components/OrderTicket.tsx, src/game/components/GameScreen.tsx, src/game/components/MenuScreen.tsx, src/game/components/ModalScreens.tsx, src/App.tsx, src/game/audio.ts

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.