Copy pack
Build from the verified source Master Prompt and Build Contract for the playable pixel game engine. Preserve movement, pickup, serve handoff, waves, generated sprite assets, and no shop/POS drift.
Master Prompt Build Contract
Master Prompt
Copy Master Prompt# Master Build Prompt: CoffeeCart Game
Build CoffeeCart Game as a desktop-first pixel-art browser-game starter, not a dashboard, checkout flow, restaurant POS, static illustration, or decorative UI shell. The first screen should feel like opening a small indie game: a playable canvas coffee shop with generated pixel assets, walking customers, a moving player character, drink pickup, customer handoff, score, missed orders, and several short rounds.
Product purpose:
- Let the player run a tiny coffee shop counter.
- Customers walk in from the sidewalk and occupy visible queue slots.
- Each customer shows a drink order and patience bar.
- The player moves around the shop, picks up a drink from the matching station, carries it, and serves it to a waiting customer.
- Correct handoffs add score and combo.
- Wrong handoffs or slow service create missed-order feedback.
- The demo includes several short rounds/waves so the starter feels modifiable as a game base, not a one-click toy.
Game architecture and asset policy:
- Keep simulation state outside the renderer: player position, player idle/walk state, carriedDrink, customers, customer state, patience, queue slots, drink stations, round, wave size, score, combo, missed count, message, one-line notification, and log are game state.
- The renderer owns canvas drawing, sprite draw order, animation frame selection, hit-area visualization, and pointer-to-world coordinate mapping.
- Use a canvas playfield for the coffee shop map and moving sprites. DOM is allowed for HUD, start/interact/reset controls, copy rail, and accessible state mirrors.
- Use a stable generated pixel asset manifest:
- shop-map: /library-assets/coffeecart-pixel/coffeecart-pixel-shop-v1.png
- player-sheet: /library-assets/coffeecart-pixel/coffeecart-pixel-barista-directional-v1-normalized.png
- customer-sheet: /library-assets/coffeecart-pixel/coffeecart-pixel-customers-sheet-v2-normalized.png
- drink-sheet: /library-assets/coffeecart-pixel/coffeecart-pixel-drinks-sheet-v2-normalized.png
- Chroma-keyed source sheets may remain in the repo, but runtime sprites should use normalized transparent PNG sheets or an equivalent processed atlas.
- Keep sprite frame counts, pivots, world coordinates, and station/queue manifest keys easy to replace.
- Normalize character frames to a consistent bottom-center anchor and visible body scale so the barista and customers stand on the floor, never float, compress, pop larger/smaller across direction rows, or show magenta/punk-color chroma outlines.
- The barista must use a full 6-column by 4-row directional animation sheet: down, up, right, and left rows, each with one idle frame plus a 5-frame walk loop. All four rows must keep the same visible body height and floor anchor. Do not fake left/right walking by sliding one still frame.
- Do not ship the game as a static poster, fake screenshot, or canvas that only animates decorative effects.
- Desktop is the supported preview size. On mobile/small screens, show a clear desktop-required message instead of a broken tiny game.
UI style and color tokens:
- Overall tone: arcade-cozy, readable, fast, coffee-cart specific.
- Page background: #F6FBF4.
- Espresso frame: #3A2418.
- Cream ticket: #FFF8F1.
- Warm counter: #F7E2C4.
- Mocha/callout accent: #E05F2B.
- Mint correct accent: #74C69D.
- Cold-brew blue: #274C77.
- Stage blue: #173A4D.
- Text: #21170F.
- Use compact familiar lucide icons for coffee, timer, trophy, miss, and retry controls. Do not use a single brown/orange palette; balance espresso/cream with mint and blue game colors.
Required layout:
- Open with the CoffeeCart game surface as the main product, not an explanatory card beside it.
- Header strip: CoffeeCart pixel shift label, current round-state pill, and Start shift, Pick up / serve, and Reset controls.
- Game cabinet frame with a top HUD showing Score, Carry, Clients, Round, and State.
- Main stage is an animated pixel-art canvas playfield, not static cards. It must render the coffee shop map, barista/player, walking customers, order bubbles, patience bars, drink stations, carried drink, and queue slots.
- The canvas display must preserve the 960x640 world aspect ratio when the browser resizes. Do not use a flexible width with a fixed CSS height that compresses the barista or shop art.
- Keep the ready-state playfield clear. Do not cover the map with a half-opacity center play-area wash or a large in-canvas Start shift card; the header Start shift button and bottom notification are enough.
- Customers enter from the sidewalk and visibly walk to queue positions before waiting.
- Drink pickup markers sit on top of the coffee bar, aligned with the counter stations, not floating in the middle of the floor.
- The player sprite visibly moves to the bar, picks up a cup, carries it, then moves to a customer for handoff.
- A compact Wave chip sits in the top-left of the playfield.
- Active orders may sit in the top-right as a compact playfield HUD.
- Round log should be a single in-game notification that shows one latest event at a time, not a bottom panel or multi-row dashboard.
- A small game-style movement indicator sits in the bottom-left with four directional keycaps for up, down, left, and right.
- Copy rail outside the preview may expose only Master Prompt and Build Contract.
Required interactions:
- Start shift changes state from Ready to Serving and begins spawning customers.
- Keyboard or pointer movement changes the player position; the player must not be a decorative icon. Up, down, left, and right movement select matching facing rows from the player sheet.
- The movement indicator highlights or visually reflects directional input.
- Pick up / serve near a drink station changes carriedDrink to Espresso, Latte, Mocha, or Cold brew.
- Pick up / serve near a waiting customer hands off the carried drink.
- Correct drink handoff marks that customer served, adds score, increases combo, clears carriedDrink, and sends the customer out.
- Wrong drink handoff marks that customer wrong/missed, increments missed count, clears carriedDrink, and sends the customer out.
- Waiting customers lose patience over time; when patience reaches zero, they leave and missed count increases.
- When all customers in a wave are served/missed, the round completes. Start shift becomes Next round until the three-round demo is complete.
- Reset restores round, score, missed count, customers, carriedDrink, player position, message, and log.
Required states:
- Ready.
- Serving.
- Customer walking.
- Customer waiting.
- Carrying drink.
- Served.
- Wrong drink / missed.
- Round complete.
- Demo complete.
- Desktop-required mobile fallback.
- Validation feedback when the player picks up or serves before starting, away from stations, or away from waiting customers.
Demo data shape:
- assetManifest: shop-map, player-sheet, customer-sheet, drink-sheet
- stations: drink, label, x, y
- queueSlots: x, y
- customers: id, name, drink, spriteFrame, state, x, y, targetX, targetY, patience, maxPatience
- player: x, y, facing, carriedDrink, target
- phase
- round
- waveSize
- spawned
- completed
- drinks: id, label, short label, colors
- score
- missed
- served
- combo
- message
- latestNotification
- inputKeys
Non-goals:
- No match-3 grid, candy, coins, boosters, shops, checkout, Stripe, payments, cart checkout, ecommerce, loyalty wallet, player accounts, cloud saves, leaderboards, analytics dashboard, business dashboard, restaurant POS, inventory system, or fake revenue metrics.
- No SaaS cards, CRM, admin dashboard, customer database, or public marketing page.
- No broad coffee-shop app beyond the tiny playable pixel serving loop.
- No mobile-first redesign for this pack; mobile should show desktop-required fallback.
- No non-playable canvas poster, fake game screenshot, one-click button demo, decorative sprite sheet that is not wired into gameplay, distorted canvas aspect ratio, half-opacity center play-area wash, large in-canvas Start shift card, bottom dashboard log panel, floor-floating drink selector, compressed character sprite, direction-row scale drift, one-frame sliding side-walk sprites, or visible chroma-outline artifact.
Acceptance criteria:
- A tester can start the shift, watch customers walk in, move the player, pick up a drink, carry it, serve a correct drink, serve a wrong drink, miss a patient customer, complete a wave, start the next round, and reset.
- Score, missed count, carriedDrink, player position, active customers, round state, wave progress, message, and log visibly update.
- The ready-state map stays visible without a center overlay card, the canvas keeps a 3:2 display ratio when resized, and the player has grounded directional idle poses, consistent visible body scale across direction changes, visible multi-frame walking animation in all four directions, and no visible magenta/chroma outline.
- Drink pickup markers are on the coffee bar; wave/log/control indicators are compact in-game HUD overlays.
- The canvas playfield visibly changes with game state and is not a decorative poster.
- The game keeps the coffee-cart order loop and never drifts into match-3 candy, coins, boosters, shops, checkout, accounts, or dashboard scope.
- The preview clearly labels placeholder game data.