Yatzy - Classic Dice Board Game

Seele01-Flash
By
Yatzy is a beloved classic dice game that combines luck and strategy. Roll five dice to create scoring combinations and achieve the highest possible score in this timeless board game experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Yatzy (3D Dice Board Game)". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A clean, "Digital Casino" aesthetic. Use a high-quality green felt texture for the ground plane (table). * **Models:** * **Dice:** Generate 5 standard six-sided dice using `THREE.BoxGeometry` with slightly rounded corners (chamfer) or a low-poly bevel modifier to look realistic. The pips (dots) should be distinct textures or geometry indented into the cube. * **Walls:** Invisible collision walls around the table edges to keep dice within the camera view. * **Lighting & Effects:** Soft, warm top-down spotlighting to cast realistic shadows on the felt. Add a subtle motion trail renderer or particle effect behind the dice when they are moving at high velocity. * **Performance:** Use baked shadows where possible or `PCFSoftShadowMap`. Limit geometry complexity (low-poly dice) to ensure 60 FPS on mobile browsers. ### 2. Audio Requirements * **BGM:** A relaxing, looping "Lounge Jazz" or "Bossa Nova" track (piano and soft percussion) to simulate a calm board game atmosphere. * **SFX:** * **Rolling:** A randomized series of "plastic clicking against wood/felt" sounds that trigger based on physics collisions. * **Selection:** A satisfying "tock" sound when a player taps a die to hold/lock it. * **Scoring:** A "cash register" or "digital chime" sound when confirming a score. * **Yahtzee:** A celebratory fanfare and crowd cheer if 5 identical dice are rolled. ### 3. Gameplay Loop * **Core Mechanics:** 1. **The Roll:** Player rolls 5 dice (physics-impulse based using a library like Cannon.js or Oimo.js is preferred for realism). 2. **Hold Phase:** Player taps dice to "Keep/Hold". Held dice move to a designated area or highlight visually and do not roll in the next phase. 3. **Reroll:** Player has up to 3 rolls per turn to achieve a combination. * **Scoring System:** Implement standard Yatzy rules. Categories include: Ones-Sixes, 3-of-a-kind, 4-of-a-kind, Full House, Small Straight, Large Straight, Yahtzee, and Chance. * **Win Condition:** The game consists of 13 rounds (one for each category). The goal is to maximize the total score. Display a "Game Over" modal with the final score and a "Play Again" button. ### 4. Mobile Controls & Interaction * **Orientation:** **Portrait Mode** (Vertical) is mandatory to accommodate the 3D dice area at the top and the long scorecard list at the bottom. * **Touch Controls:** * **Dice Selection:** Use `Raycaster` to detect touch/click on 3D dice objects. Tapping a die toggles its "Hold" state. Visually lift the die slightly or add a glow outline to indicate it is locked. * **Roll Button:** A large, thumb-friendly button (minimum 88px height) fixed at the bottom of the 3D view area. * **Scorecard:** An HTML/CSS overlay below the canvas. Tapping a score category row calculates the score based on current dice and confirms the turn. * **Feedback:** * **Haptics:** Trigger `navigator.vibrate(50)` when a die hits a wall or when selecting a die. * **Visuals:** Display floating text "+Score" when a category is filled. 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 one of the most popular dice games worldwide, offering players an engaging blend of luck, strategy, and skill. This classic board game challenges you to roll five dice and create specific combinations to maximize your score. With its simple rules yet deep strategic gameplay, Yatzy has captivated players for generations and continues to be a favorite among puzzle and board game enthusiasts.

The game follows traditional Yatzy rules where players have up to three rolls per turn to achieve the best possible combination. Each game consists of 13 rounds, and your goal is to score points in different categories on the scorecard, from simple number combinations to challenging patterns like full houses and straights.

Core Features

Classic Gameplay Experience

Enjoy the authentic Yatzy experience with traditional rules and scoring system. The game maintains all the strategic depth that makes Yatzy so engaging, allowing you to plan your moves and decide which combinations to pursue based on your dice rolls.

Completely Free to Play

Yatzy is entirely free with no hidden costs or premium features. Access the full game experience without any payment requirements or subscription fees.

Instant Browser Play

No downloads or installations required. Simply open your web browser and start playing immediately. The game runs smoothly on both desktop computers and mobile devices.

Strategic Decision Making

Every turn presents meaningful choices: which dice to keep, which to reroll, and which scoring category to fill. These decisions create engaging gameplay that rewards both tactical thinking and risk assessment.

Clean, Intuitive Interface

The game features a clear, easy-to-read design with prominent dice graphics and a well-organized scorecard. The green felt background creates an authentic casino-style atmosphere while maintaining excellent readability.

Game Gameplay

Yatzy follows a structured turn-based format that's easy to learn but offers plenty of strategic depth:

Basic Turn Structure

  1. Roll the Dice : Start each turn by rolling all five dice
  2. Analyze Results : Examine your dice to identify potential scoring combinations
  3. Choose Keepers : Select which dice to keep for your next roll
  4. Reroll : Roll the remaining dice (you get up to 3 total rolls per turn)
  5. Score : Choose a category on your scorecard to record your points

Scoring Categories

The scorecard includes various scoring opportunities: - Number Sections : Score points for collecting specific numbers (1s through 6s) - Pairs and Sets : Score for pairs, three-of-a-kind, and four-of-a-kind - Straights : Achieve sequential number patterns for bonus points - Full House : Combine a three-of-a-kind with a pair - Yatzy : The ultimate achievement - five dice showing the same number

Operation Guide

Mouse Controls : The game uses simple point-and-click mechanics - Left Mouse Button : Click to roll dice, select dice to keep, and choose scoring categories - Dice Selection : Click individual dice to toggle between keeping and rerolling - Scorecard Interaction : Click on scoring categories to record your points - Roll Button : Click the roll button to execute your dice roll

Game Flow

  1. Click the "Roll" button to start your turn
  2. Click on dice you want to keep (they'll be highlighted)
  3. Click "Roll" again to reroll the unselected dice
  4. After up to 3 rolls, click a scoring category to record your points
  5. Repeat for 13 rounds to complete the game

Why Play This Game

Yatzy offers a perfect balance of accessibility and depth that appeals to players of all skill levels. Unlike purely luck-based games, Yatzy rewards strategic thinking and probability assessment. Each decision matters, from which dice to keep to which scoring categories to prioritize.

The game's quick rounds make it perfect for short gaming sessions, while the strategic elements provide enough depth for extended play. Whether you're looking to beat your personal best score or simply enjoy a relaxing dice game, Yatzy delivers consistent entertainment.

Its browser-based format means you can play anywhere with an internet connection, making it an ideal choice for breaks at work, travel entertainment, or casual gaming at home. The timeless appeal of dice games combined with modern convenience creates an experience that's both nostalgic and contemporary.

Frequently Asked Questions (FAQ)