Casual Chess

Seele01-Flash
By
Casual Chess offers the timeless strategy of chess in a user-friendly online format. Play against intelligent computer opponents with three difficulty levels, multiple visual themes, and a helpful hint system for players of all skill levels.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Casual Chess**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Clean, minimal, and stylized 3D. Mimic the screenshot's vector art aesthetic by using **Low-Poly models** with a matte or slightly reflective material (MeshStandardMaterial with low roughness). * **Color Palette:** * **Background:** A smooth radial gradient (CSS or Shader) transitioning from dark slate blue (#2C3E50) in the center to deep black (#000000) at the edges to focus attention on the board. * **Board:** Alternating tiles of cool grey (Light) and deep charcoal (Dark). * **Pieces:** Player 1 (White/Silver), Player 2/AI (Black/Obsidian). * **Themes System:** Include code structure to toggle between 3 texture sets: "Classic" (Wood/Ivory), "Modern" (The screenshot style), and "Neon" (Dark board with glowing edges). * **Mobile Optimization:** Use **InstancedMesh** for the 64 board tiles to reduce draw calls. Chess piece models must be low-poly (<500 vertices per piece). Lighting should rely on a simple setup (1 Ambient + 1 Directional Light) to maintain high FPS. ### 2. Audio Requirements * **BGM:** A calm, intellectual, and looping track. Think "Lounge Jazz" or "Ambient Piano" that aids concentration without becoming repetitive. * **Sound Effects (SFX):** * **Selection:** A subtle, soft "pop" or wooden tap. * **Movement:** A satisfying "slide-and-click" sound simulating felt on wood. * **Capture:** A heavier, punchier "thud" or a distinct "clack" sound. * **Check/Checkmate:** A short, dramatic chime or orchestral sting. * **UI Interaction:** Crisp digital clicks for buttons (Undo, Hint). ### 3. Gameplay Loop * **Core Mechanics:** Implement standard FIDE chess rules, including distinct movement patterns for King, Queen, Rook, Bishop, Knight, Pawn. Include special moves: Castling, En Passant, and Pawn Promotion (auto-promote to Queen for simplicity in this MVP). * **Opponent (AI):** A basic chess engine (Minimax algorithm with Alpha-Beta pruning) capable of 3 difficulty levels (looking ahead 1, 2, or 3 moves). * **Hint System:** When the user taps a "Hint" button, visually flash the piece that should be moved and the target tile (e.g., using a yellow emissive pulse). * **Win/Loss:** * **Checkmate:** Game over screen with "You Win" or "You Lose" modal. * **Stalemate/Draw:** "Draw" modal. * Game must offer a "Replay" button upon completion. ### 4. Mobile Controls & Interaction * **Camera:** Fixed perspective camera (approx 45-degree angle), optimized for a clear view of the whole board on both portrait (vertical) and landscape orientations. * **Touch Input (Raycaster):** * **Tap 1 (Select):** Tap a piece to lift it slightly (y-axis tween) and highlight the tile underneath in Blue. Calculate and highlight all legal moves on the board with green glowing markers or dots. * **Tap 2 (Move):** Tap a highlighted legal tile to move the piece. Use a smooth Tween animation (e.g., GSAP or TWEEN.js) to glide the piece to the new spot. * **Tap 3 (Deselect):** Tapping anywhere else cancels the selection. * **UI & HUD:** * **Portrait Mode:** UI at the bottom (Undo, Hint, Reset). * **Landscape Mode:** UI on the right sidebar. * **Button Size:** All interactable UI elements must be at least 44x44 pixels. * **Feedback:** Trigger a short haptic vibration (using `navigator.vibrate(10)`) when a move is successfully completed or a piece is captured. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Casual Chess brings the world's most beloved strategy game directly to your browser. This classic chess implementation combines traditional gameplay with modern convenience, offering an accessible yet challenging chess experience for players of all skill levels. Whether you're a complete beginner learning the ropes or an experienced player looking for a quick match, Casual Chess provides the perfect platform to enjoy this timeless game.

The game features a clean, intuitive interface that makes it easy to focus on strategy and gameplay. With no downloads required and instant browser access, you can start playing immediately and enjoy chess anywhere, anytime.

Core Features

Multiple Difficulty Levels

Choose from three distinct difficulty settings that cater to different skill levels:

  • Beginner Mode : Perfect for newcomers to chess, with forgiving AI that helps you learn basic strategies
  • Intermediate Mode : Balanced gameplay for developing players who understand the fundamentals
  • Advanced Mode : Challenging AI that will test even experienced chess players

Visual Customization

Personalize your chess experience with three beautiful themes. Each theme offers a unique visual style while maintaining clear piece recognition and board visibility.

Intelligent Hint System

The built-in hint feature is perfect for learning and improvement: - Suggests optimal moves when you're stuck - Helps beginners understand chess strategies - Teaches tactical patterns and common combinations - Can be used sparingly to maintain challenge

Classic Chess Rules

Experience authentic chess gameplay with all traditional rules implemented: - Standard piece movements and capture rules - Special moves including castling, en passant, and pawn promotion - Check and checkmate detection - Proper game ending conditions

Game Controls

The control scheme is designed for maximum simplicity and accessibility:

  • Select Pieces : Click or tap on any of your pieces to select it
  • Make Moves : Click or tap on a valid destination square to move your selected piece
  • Visual Feedback : Selected pieces and valid moves are clearly highlighted
  • Undo Function : Take back moves if available in your chosen difficulty setting

The intuitive point-and-click interface works seamlessly on both desktop computers and mobile devices, ensuring a smooth chess experience regardless of your platform.

Why Play Casual Chess

Perfect Learning Environment

Casual Chess creates an ideal environment for improving your chess skills. The hint system provides guidance without being intrusive, allowing you to learn at your own pace. The multiple difficulty levels ensure you're always appropriately challenged as your skills develop.

Convenient and Accessible

With no account registration required and instant browser gameplay, you can enjoy a chess match whenever inspiration strikes. The game saves your progress locally, so you can return to unfinished games.

Stress-Free Experience

Unlike timed online matches against human opponents, playing against the computer allows you to think carefully about each move without pressure. This relaxed environment is perfect for practicing new strategies and experimenting with different opening systems.

Brain Training Benefits

Regular chess play provides excellent mental exercise, improving: - Strategic thinking and planning - Pattern recognition - Concentration and focus - Problem-solving abilities - Memory and calculation skills

Frequently Asked Questions (FAQ)