Dice Wars

Seele01-Flash
By
Dice Wars is an engaging strategy conquest game where luck meets tactical thinking. Roll dice to capture territories, compete against up to 7 players, and conquer the world one territory at a time.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Dice Wars: 3D Tactics**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A clean, modern "Digital Board Game" aesthetic. Convert the original 2D irregular map into a **3D Hexagonal Grid System**. * **Map Generation:** Procedurally generate a map composed of hexagonal tiles. These tiles should be grouped into irregular "Territories" (clusters of hexes) assigned to different players (colors). * **Color Palette:** Use high-saturation, distinct colors for up to 7 players (Purple, Green, Yellow, Pink, Cyan, Orange, Blue) to ensure visibility on small screens. The background should be a clean, neutral dark grey or a wooden table texture to make the colored territories pop. * **Dice Models:** Use simple 3D cubes with dot textures (1-6) or pips. These should physically stack vertically on top of the tiles to represent unit count (1 to 8 dice high). * **Performance Optimization (Mobile):** Use `THREE.InstancedMesh` for rendering the hexagonal tiles and dice to ensure 60FPS on mobile devices. Use simple Lambert or Phong materials to reduce lighting calculation overhead. ### 2. Audio Requirements * **BGM:** A looping, relaxing "Strategy/Lounge" track. Think light jazz or ambient tactical music that encourages thinking but isn't distracting. * **Sound Effects (SFX):** * **Select:** A soft "pop" or "click" when tapping a territory. * **Attack/Roll:** The sound of multiple dice shaking and hitting a wooden board (clattering). * **Victory:** A rising chime or "capture" sound when a territory is taken. * **Defeat:** A dull thud or "error" buzzer when an attack fails. * **Turn End:** A "cash register" or "stacking" sound representing new dice being added to the board. ### 3. Gameplay Loop * **Turn-Based Mechanics:** The game cycles through players (Player vs. AI). The active player selects a territory they own (must have >1 die) and then selects an adjacent enemy territory to attack. * **Battle Logic:** * Both sides roll the number of dice currently on their respective territories. * **Sum Calculation:** Calculate the total sum of the pips. * **Win Condition:** If Attacker Total > Defender Total, the attacker wins. All attacking dice (minus 1, which stays behind) move to the captured territory. The defender's dice are destroyed. * **Loss Condition:** If Attacker Total <= Defender Total, the attacker loses. The attacker loses all dice on the attacking tile except 1. * **End of Turn & Reinforcements:** * When the player clicks "End Turn", they receive new dice. * **Calculation:** Count the number of *contiguous* (connected) territories owned. Give that number of dice as reinforcements. * **Distribution:** Randomly distribute these dice among owned territories, up to a maximum of 8 dice per tile. * **Win/Loss:** The game ends when one player owns all territories (Win) or the human player loses all territories (Game Over). ### 4. Mobile Controls & Interaction * **Camera:** Isometric perspective (`OrthographicCamera`) is preferred for clarity. Allow single-finger panning and two-finger pinch-to-zoom. * **Touch Interactions:** * **Selection:** Raycasting on tap. First tap selects the source territory (highlight with a white glow). Second tap on a valid neighbor triggers the attack. * **Visual Feedback:** When a source is selected, highlight valid targets (neighbors) with a pulsing effect. Invalid targets should not react. * **UI Layout:** * **Bottom Bar:** A large, thumb-friendly "END TURN" button fixed to the bottom right corner (min-height 60px). * **Stats Display:** Minimalist text at the top showing "Current Turn: [Player Color]" and "Territories Owned: [Count]". * **Animation:** When attacking, do not just show numbers. Animate the 3D dice "jumping" or arcing from the attacker tile to the defender tile using a simple tweening library (like TWEEN.js or GSAP) to provide satisfying impact feedback. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Dice Wars is a captivating blend of strategy and chance that challenges players to conquer territories through strategic dice rolling. This turn-based conquest game combines tactical decision-making with the excitement of dice probability, creating an engaging experience where every roll matters. The game has earned popularity among strategy enthusiasts who enjoy games that balance skill with luck.

In this colorful 2D strategy game, players compete to dominate a map divided into various territories. Each territory is represented by vibrant colors and contains dice that determine its defensive strength. The core gameplay revolves around strategic attacks where players roll dice against neighboring territories, with higher rolls securing victory and territorial expansion.

Core Features

Dice Wars offers several compelling gameplay elements that make each match unique and exciting:

Strategic Territory Management

Every territory you control generates dice over time, but managing your forces requires careful planning. You must decide when to attack, when to defend, and how to distribute your dice across your empire. Spreading too thin leaves you vulnerable, while concentrating forces may miss expansion opportunities.

Multiplayer Competition

Compete against up to 7 AI or human opponents in intense territorial battles. Each player starts with randomly distributed territories and must use cunning strategy to outmaneuver rivals. The multiplayer aspect adds unpredictability as opponents develop their own conquest strategies.

Risk vs Reward Mechanics

The game's core tension comes from deciding how many dice to commit to each attack. Using more dice increases your chances of success but depletes your defenses elsewhere. This risk-reward balance keeps every decision meaningful and every turn suspenseful.

Dynamic Map Configurations

Experience varied gameplay across different map layouts, each presenting unique strategic challenges. Some maps favor aggressive expansion, while others reward defensive positioning and patient empire building.

Game Gameplay

Dice Wars follows intuitive turn-based mechanics that are easy to learn but challenging to master:

Territory Attacks : Click on your territory, then click an adjacent enemy territory to initiate combat. Your dice automatically roll against the defender's dice, with the higher total winning the battle.

Dice Management : Successfully captured territories grant you additional dice at the end of your turn. Plan your attacks to maximize dice generation while maintaining strong defensive positions.

Chain Attacks : Winning an attack allows you to continue attacking with the same territory, enabling powerful chain reactions that can dramatically shift the game balance.

Strategic Positioning : Control of strategic territories like narrow passages or central locations can provide significant advantages in both offense and defense.

Controls Guide

The game features simple, intuitive controls designed for both desktop and mobile play:

  • Left Click/Tap : Select your territory to attack from
  • Left Click/Tap : Choose target enemy territory to attack
  • Interface Navigation : Use mouse or touch to navigate menus and game options

The streamlined control scheme ensures that strategy, not complex controls, determines victory.

Why Play Dice Wars

Dice Wars stands out in the strategy game genre for several compelling reasons:

Perfect Balance of Skill and Luck : While dice rolls introduce exciting unpredictability, strategic thinking and tactical planning ultimately determine long-term success. Good players consistently outperform lucky players through superior positioning and risk management.

Quick, Engaging Sessions : Each game typically lasts 10-30 minutes, making it perfect for quick entertainment breaks or longer strategic sessions. The turn-based nature allows for thoughtful decision-making without time pressure.

Accessible Yet Deep : Simple rules make the game immediately playable, while deep strategic possibilities provide long-term engagement. New players can enjoy their first game, while experienced players continue discovering advanced tactics.

Free Browser Gaming : Enjoy full gameplay without downloads, installations, or payments. The web-based format ensures instant access across all modern devices and browsers.

Competitive Multiplayer : Test your strategic skills against AI opponents of varying difficulty levels, providing appropriate challenges for players of all skill levels.

Frequently Asked Questions (FAQ)