Crystal Hunt Chess
Crystal Hunt Chess
Embark on a unique chess adventure where strategy meets a dazzling quest! Crystal Hunt Chess reimagines the classic game, challenging players not only with traditional checkmates but also with the thrilling objective of collecting precious crystals scattered across a dynamic, cross-shaped battlefield. Face off against increasingly cunning AI opponents, including a formidable Left AI and, on super hard levels, a challenging Right AI, each with their own agenda.
How to Play
- Objective:
- The primary goal for you (White) is to be the first to collect two (2) mystical crystals (💎).
- Alternatively, achieve checkmate against the main Black AI's King to win the current level.
- New Goal Mode: If all crystals on the board are collected by any combination of players before anyone reaches the 2-crystal win condition, the objective shifts! The new goal for you becomes to checkmate any active AI opponent.
- Your Pieces: You control the White pieces.
- Movement: All pieces (Pawns, Knights, Bishops, Rooks, King) move according to standard chess rules.
- Pawns capture diagonally.
- Pawns promote to a Queen upon reaching the opponent's furthest rank.
- En Passant is a valid capture.
- Castling is currently disabled in this variant.
- Turns: Play proceeds in a turn-based manner:
- You (White)
- Black AI
- Left AI (appears from Level 5, active on levels that are multiples of 5)
- Right AI (appears on "Super Hard Levels" - every 10th level)
The cycle repeats. If an AI is not active on the current level, their turn is skipped.
- Interactions: Click on one of your pieces to see its possible moves (highlighted with dots or circles for captures). Click on a valid highlighted square to make your move.
Game Elements
- The Board: A unique 9x9 cross-shaped arena. Not all squares are playable; pieces can only move on the designated cross pattern. The playable area expands slightly to accommodate the starting positions of the Left and Right AIs when they are active.
- Crystals (💎): Three crystals are randomly placed on empty, playable squares at the start of each level. They must be at least two cells away from any other crystal and not directly adjacent to any starting piece.
- Collecting: Any piece captures a crystal by moving onto its square. Pawns capture crystals by moving onto them diagonally.
- Players:
- White (You): Your goal is to win!
- Black AI: Your primary AI opponent, present on all levels. Pawns move traditionally "down" the board.
- Left AI (Red Pieces): Appears from Level 5 onwards, specifically on levels that are multiples of 5 (e.g., 5, 10, 15, 20...). Its pawns move from the board's left side towards the right.
- Right AI (Orange Pieces): A special challenger appearing on "Super Hard Levels" (every 10th level, e.g., 10, 20, 30...). Its pawns move from the board's right side towards the left.
- Piece Variation:
- On odd-numbered levels starting from Level 3 (e.g., 3, 5, 7...), your flank piece (and Black AI's) that would normally be a Bishop becomes a Rook, adding a different tactical challenge.
- Level Progression: Advance through levels by winning. Each level may present different AI configurations or challenges.
- Player Lives: You start with three (3) lives. Losing a level costs one life.
- UI Indicators:
- Game Progress Panel: Shows current level, lives, and crystal counts for all active players.
- Turn & Status Display: Indicates whose turn it is and if a player is in CHECK.
- Hard/Super Hard Level: A visual indicator on the right side of the screen highlights these challenging levels.
- New Goal Notification: Appears when all initial crystals are collected, signaling the shift in objective to checkmate.
- Check/Checkmate Banners: Large visual cues for these critical game states.
Winning and Losing
- Winning a Level (You - White):
- Be the first to collect 2 crystals.
- Deliver checkmate to the Black AI's King.
- If "All Crystals Collected Mode" is active: Deliver checkmate to any active AI King (Black, Left, or Right).
- An AI King is "captured" (its square is occupied by your piece).
- Losing a Level (You - White):
- Your King is checkmated by any AI player (Black, Left, or Right).
- Any AI player (Black, Left, or Right) is the first to collect 2 crystals.
- Your King is "captured" (its square is occupied by an AI piece).
- You resign.
- You run out of lives (leads to "Game Over").
- Stalemate: If your King is not in check but you have no legal moves, the level results in a stalemate. You will be prompted to retry the level (does not cost a life).
- Game Over: Occurs when you lose your last life. You'll have the option to restart the entire game.
Technical Details
- Platform: Implemented using p5.js, a JavaScript library for creative coding.
- AI: Opponents utilize the minimax algorithm with alpha-beta pruning for move selection, considering material balance, positional advantages (via piece-square tables), and crystal proximity. The AI search depth is currently set to 3 plies.
- Board Dynamics: The game features a non-standard 9x9 cross-shaped board with dynamically changing playable areas based on active side AIs. Piece sets also vary on certain levels.
- Animation: Piece movements are animated using easing functions for a smoother visual experience.
Future Improvements
- Advanced AI for Side Players: Develop more sophisticated evaluation functions and move logic for the Left and Right AIs that fully account for their unique board perspectives and pawn movements (e.g., rotated piece-square tables).
- Inter-AI En Passant: Implement the complex En Passant rules for captures between vertically moving pawns (White/Black) and horizontally moving pawns (Left/Right AIs).
- Player Pawn Promotion Choice: Allow the human player to choose which piece (Queen, Rook, Bishop, or Knight) their pawn promotes to.
- More Varied Level Objectives: Introduce levels with different goals beyond crystal collection or checkmate (e.g., "survive X turns," "reach a specific square").
- Sound Polish: Enhance existing sounds and add more ambient or event-specific audio cues.
- Visual Enhancements: Option for graphical piece sets instead of Unicode; more detailed board themes.
- Difficulty Scaling: More granular difficulty adjustments for the AI, perhaps tied to level progression beyond just adding more opponents.
- Tutorial Mode: An interactive tutorial for new players.
- Save/Load Progress: Allow players to save their current level and lives.
- Threefold Repetition / 50-Move Rule: Implement these standard chess draw conditions
Development log
- New Feature Highlights6 days ago
Leave a comment
Log in with itch.io to leave a comment.