Hex Empire - Turn-Based Strategy Game

Seele01-Flash
By
Hex Empire is an engaging turn-based strategy game where you command armies to conquer territories and dominate entire maps. Start with a single nation and strategically expand your empire through tactical warfare.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Hex Empire 3D Redux". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** "Living Board Game" aesthetic. The map should look like a physical tactical table. * **The Grid:** Procedurally generated hexagonal grid using `THREE.InstancedMesh` for maximum mobile performance (to handle hundreds of hexes with a single draw call). * **Terrain Types:** * **Plains:** Light green matte material. * **Water:** Blue material with a subtle, low-cost sine-wave animation or simple transparency. * **Cities:** Represented by small cluster of low-poly cubes (skyscrapers) or a distinct castle model on the hex. * **Ports:** Indicated by a simple anchor icon texture floating above water hexes adjacent to land. * **Units:** Instead of flat sprites, use low-poly, untextured "toy soldier" or "pawn" meshes (like board game pieces). Each player's units are colored distinctively (Red, Blue, Purple, Green). * **Territory Borders:** Use `THREE.LineSegments` or glowing edges on the hex geometry to indicate which player owns which territory. The color intensity should fade slightly towards the center of the territory. * **Camera:** Isometric orthographic camera ( `THREE.OrthographicCamera`) to maintain the tactical view without perspective distortion. ### 2. Audio Requirements * **BGM:** A looping military march track—snare drums, brass instruments, but kept low-fidelity or "toy-like" to match the visual style. It should be strategic and pensive, not overly aggressive. * **SFX:** * **Selection:** A crisp "click" or "snap" sound (like a board game piece being picked up). * **Movement:** A "thud" sound when a unit lands on a new hex. * **Combat:** A brief "gunfire" burst or "sword clash" sound effect. * **Capture:** A "trumpet fanfare" short stinger when a city is taken. * **UI:** Soft clicks for menu buttons; a "buzzer" sound for invalid moves. ### 3. Gameplay Loop * **Turn-Based System:** The game operates in strict turns: Player -> CPU 1 -> CPU 2 -> CPU 3. * **State Machine:** 1. **Selection Phase:** Player taps a hex with an army. 2. **Move Phase:** Valid neighbor hexes are highlighted. Player taps a target. 3. **Combat/Capture Phase:** * If target is empty: Army moves, morale decreases slightly due to fatigue. * If target is enemy: Compare Strength + Morale. Higher number wins (with some RNG variance). * If target is City/Port: Capture it to increase reinforcement rate. 4. **End Turn:** Player presses a button; reinforcements are spawned at cities based on territory size. * **Win/Loss:** * **Win:** Capture all enemy capitals. * **Loss:** Player's capital is captured. ### 4. Mobile Controls & Interaction * **Touch Input:** * **Tap:** Select unit / Confirm move. Use `THREE.Raycaster` mapped to touch coordinates. * **Pinch-to-Zoom:** Essential for navigating large maps on small screens. * **Two-Finger Pan:** To drag the map view without accidentally selecting units. * **Visual Feedback:** * When a unit is tapped, spawn a "selection ring" or bounce the mesh slightly. * Draw a dashed line (using `THREE.Line`) showing the path from the selected unit to the touched destination before confirming. * **UI Layout (HUD):** * **End Turn Button:** Large, floating action button (FAB) in the bottom-right corner (min 60x60px). * **Stats Panel:** A compact top bar showing "Morale", "Gold/Manpower", and "Territory %". * **City Labels:** Use HTML overlays (`CSS2DRenderer`) for city names to ensure text remains crisp and readable regardless of 3D zoom level. * **Haptics:** Trigger `navigator.vibrate(50)` on successful move selection and `navigator.vibrate([30, 50, 30])` upon combat victory. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Hex Empire is a captivating turn-based strategy game that combines tactical warfare with territorial conquest. In this hexagonal grid-based battlefield, you begin with control of just one nation and must strategically expand your empire by conquering neighboring territories. The game challenges your strategic thinking as you balance military expansion with maintaining troop morale.

Core Features

Strategic Hexagonal Gameplay

The game features a unique hexagonal movement system that adds tactical depth to every decision. Each hex tile represents strategic positioning opportunities, forcing you to think carefully about troop placement and attack routes.

Multiple Difficulty Levels

Choose from three difficulty settings to match your strategic expertise. Whether you're new to strategy games or a seasoned commander, Hex Empire offers appropriate challenges for every skill level.

Extensive Map Collection

Explore a massive variety of maps, each presenting unique geographical challenges and strategic opportunities. From coastal regions with naval elements to landlocked territories requiring different tactical approaches.

AI Opposition

Face off against three computer-controlled nations, each with distinct behaviors and strategies. The AI opponents provide dynamic challenges that adapt to your playstyle.

Game Mechanics

Morale System

Troop morale plays a crucial role in your success. Happy soldiers fight more effectively, while demoralized troops may perform poorly in battle. Managing morale becomes as important as tactical positioning.

Turn-Based Combat

Plan your moves carefully in this turn-based environment. Each decision matters as you coordinate attacks, defend territories, and manage resources across multiple fronts.

Operation Guide

Basic Controls

The game uses simple left-click controls for all interactions. Click on your territories to select them, then click on adjacent enemy territories to launch attacks. The intuitive interface makes complex strategic decisions accessible to players of all experience levels.

Victory Conditions

Your ultimate goal is complete map domination. Successfully conquer all enemy nations and territories to achieve victory. Each conquered territory adds to your strategic resources and territorial control.

Strategic Tips

  • Maintain supply lines to keep troops well-supplied
  • Monitor enemy movement patterns to anticipate attacks
  • Balance aggressive expansion with defensive positioning
  • Keep troop morale high for maximum combat effectiveness

Why Play Hex Empire

Hex Empire offers the perfect blend of accessibility and strategic depth. The game's simple graphics focus attention on gameplay rather than flashy visuals, while the hexagonal grid system provides endless tactical possibilities. Whether you enjoy quick strategic sessions or longer conquest campaigns, this free browser-based game delivers satisfying strategic gameplay without requiring downloads or installations.

The combination of territorial conquest, army management, and strategic planning creates an engaging experience that appeals to both casual players and strategy game enthusiasts. With multiple maps and difficulty levels, Hex Empire provides excellent replay value for anyone who enjoys tactical thinking and empire building.

Frequently Asked Questions (FAQ)