Yatzy - Classic Dice Rolling Game

Seele01-Flash
By
Yatzy is a timeless dice-rolling puzzle game where strategy meets luck. Roll five dice, place them strategically, and maximize your score in this engaging classic that's perfect for quick gaming sessions.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Yatzy (Classic Dice Game)". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A vibrant, "Casual Casino" aesthetic. Use a warm color palette (purples, oranges, and deep blues) inspired by the game's logo. The scene should look clean and polished, suitable for a high-quality mobile puzzle game. * **Camera:** A static, top-down perspective (slightly angled) to view the dice tray clearly. * **Key 3D Objects:** * **The Dice:** 5 standard six-sided dice. Use `BoxGeometry` with slightly rounded corners (chamfer) for a premium feel. Textures should be white with clean black pips (dots). * **The Board/Tray:** A contained area (walled tray) where dice are rolled. The floor of the tray should resemble felt (e.g., deep purple or green) to contrast with the white dice. * **Performance (Mobile):** Use simple geometries (low-poly counts) and standard materials (`MeshStandardMaterial`). Lighting should consist of one Hemisphere Light (ambient) and one Directional Light (to cast soft shadows from the dice), ensuring 60 FPS on mobile devices. ### 2. Audio Requirements * **BGM (Background Music):** A relaxing, looped "Lounge Jazz" or "Elevator Bossa Nova" track. It should be unobtrusive to aid concentration. * **Sound Effects (SFX):** * **Rolling:** A realistic "clatter" sound of plastic dice hitting a hard surface/felt. * **Selection:** A subtle "click" or "pop" when tapping a die to hold/unhold it. * **Scoring:** A "cash register" or "writing on paper" sound when a score is confirmed. * **Yatzy!:** A celebratory fanfare or chime when the player scores a Yatzy (5 of a kind). ### 3. Gameplay Loop * **Turn Structure:** The game consists of 13 rounds. * **Rolling Phase:** * Player has 5 dice. * Player can roll up to 3 times per turn. * After the first roll, the player can tap dice to "Hold" (keep them) or "Unhold" (re-roll them). * **Scoring Phase:** * After any roll (1st, 2nd, or 3rd), the player must choose a category from the scorecard to bank their points. * **Categories:** * *Upper Section:* Aces, Twos, Threes, Fours, Fives, Sixes (Sum of specific die face). * *Lower Section:* 3 of a Kind, 4 of a Kind, Full House (25pts), Small Straight (30pts), Large Straight (40pts), Yahtzee (50pts), Chance (Sum of all dice). * **End Game:** After 13 rounds (when all categories are filled), the game ends and displays the Total Score. High score should be saved locally if possible. ### 4. Mobile Controls & Interaction * **Orientation:** **Portrait Mode (Vertical)** is mandatory for one-handed play. * **Dice Interaction:** * **Tap to Hold:** Tapping a 3D die toggles a visual state (e.g., the die lifts up slightly, glows, or moves to a separate "Reserved" area at the bottom of the tray). * **Physics/Animation:** When "Roll" is pressed, the dice should animate (spin and translate randomly within the tray bounds) before settling on a face. Avoid complex physics engines if possible; use math-based rotation animations for reliability. * **UI Overlay (DOM-based):** * **Roll Button:** A large, thumb-friendly button at the bottom center labeled "ROLL (X/3)". * **Scorecard:** A semi-transparent overlay or a scrollable list below the 3D view. * **Score Selection:** Tapping a scorecard category calculates the potential score based on current dice. If the category is already filled, it cannot be selected. * **Feedback:** Add haptic feedback (vibration) on dice tap and roll completion (if supported by the browser API). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Yatzy is a beloved classic dice game that combines strategy, luck, and quick decision-making. With an impressive 4.4/5 rating, this free puzzle game offers the perfect blend of simplicity and depth that has captivated players for generations. Whether you're a seasoned dice game enthusiast or new to the genre, Yatzy provides an accessible yet challenging experience that keeps you coming back for more.

This digital adaptation maintains all the charm of the traditional game while adding modern convenience. You can enjoy Yatzy anywhere, anytime - making it the ideal companion for those moments when you need a quick mental break or want to challenge your strategic thinking skills.

Core Features

Simple Yet Strategic Gameplay

Yatzy follows one fundamental rule: you cannot place a dice on a cell that's already occupied. This simple constraint creates surprisingly deep strategic decisions as you must carefully consider each placement to maximize your scoring potential.

Quick Gaming Sessions

Perfect for busy lifestyles, each game of Yatzy can be completed in just a few minutes. Whether you're waiting at the doctor's office, riding public transport, or have a brief break, Yatzy fits perfectly into any spare moment.

Cross-Platform Accessibility

  • Free to Play : Completely free with no hidden costs or premium features
  • Browser-Based : No downloads required - play instantly in any modern web browser
  • Mobile Optimized : Fully responsive design works seamlessly on smartphones and tablets
  • Universal Compatibility : Supports both desktop and mobile devices

Classic Dice Mechanics

Experience authentic dice-rolling action with five dice that behave just like their physical counterparts. The random nature of dice rolls ensures that every game presents new challenges and opportunities.

Game Mechanics

The Five-Dice System

Yatzy uses a traditional five-dice setup where each roll presents new possibilities. The combination of these five dice determines your scoring options and strategic choices for each turn.

Board Placement Strategy

The game board contains multiple cells that must be filled strategically. Your success depends on making smart placement decisions that maximize points while considering future roll possibilities.

Scoring System

Points are awarded based on dice combinations and placement patterns. The player with the highest total score wins, encouraging both tactical thinking and risk assessment.

How to Play

Basic Controls

  • Desktop : Use your mouse to point and click on dice to roll them
  • Mobile : Tap dice directly on your touchscreen device
  • Placement : Click or tap to place dice on available board positions
  • Rolling : Interactive dice rolling with realistic physics

Game Flow

  1. Roll the Dice : Start by rolling all five dice
  2. Analyze Options : Examine possible placements and scoring combinations
  3. Strategic Placement : Choose optimal positions for maximum points
  4. Repeat Process : Continue until all board cells are filled
  5. Final Scoring : Calculate total points to determine the winner

Winning Strategy Tips

  • Plan several moves ahead when placing dice
  • Consider both immediate points and future opportunities
  • Balance high-risk, high-reward moves with safer options
  • Pay attention to remaining board space as the game progresses

Why Play Yatzy?

Mental Exercise

Yatzy provides excellent brain training through strategic thinking and probability assessment. Each game challenges you to make optimal decisions under uncertainty, sharpening your analytical skills.

Stress Relief

The simple, rhythmic nature of rolling and placing dice creates a meditative gaming experience that helps reduce stress and provides mental relaxation.

Timeless Appeal

As a classic game that has entertained people for decades, Yatzy offers proven gameplay that never goes out of style. Its enduring popularity speaks to the perfect balance of luck and strategy.

Accessibility for All Ages

With its simple rules and intuitive gameplay, Yatzy is suitable for players of all ages and experience levels. The game's all-ages content rating ensures family-friendly entertainment.

Perfect Portable Gaming

Unlike complex games that require significant time investment, Yatzy's quick sessions make it ideal for mobile gaming. You can start and finish a complete game during short breaks throughout your day.

Frequently Asked Questions (FAQ)