King's Plot | HTML5 Game - Phaser 4

Bluehost Shared Hosting

King’s Plot is a strategic chess capture puzzle template (built with Phaser 4 + TypeScript) where pawns move only by capturing and the King must survive as the last piece. Plan your capture chains and conquer procedurally generated puzzles that are always solvable.

Core Gameplay

  • Capture-only movement — pieces never move to empty tiles: every move is a capture. Rooks slide orthogonally, Bishops slide diagonally, Queens slide both ways, Knights jump in an L, and the King steps one tile in any direction.
  • King’s survival — the King is invulnerable and can never be captured. Clear the board piece by piece until only the King remains to win the level.
  • Queen exclusivity — only the King may capture a Queen, so you must time your approach and keep control of the board until the final strike.
  • Lock rule — the pawn that just moved is locked (dimmed) until another pawn moves, forcing you to alternate pieces and plan multi-step capture sequences ahead.
  • Star collectible — optional stars appear on select levels. Capturing the star is never required to win, but star levels are verified to stay solvable even after it is taken.
  • Smart hint system — the hint button computes the recommended next capture using the exact same deterministic solver that generated the level, so the hint always agrees with the puzzle (and warns you when a board becomes unsolvable).
  • Undo & Reset — undo restores the last captured pawn and your move history; reset restarts the board whenever you reach a dead end.
  • Tutorial & progression — six guided levels teach every mechanic with a tap-me hand, live guidance and wrong-attempt lessons; progress unlocks new levels, and cleared levels grant hint/undo credits.
  • Procedural level generator — boards from 4×4 to 8×8, generated from a seed with guaranteed solvability, difficulty scores from very-easy to insane, and one-command CLI regeneration.
  • Juicy feedback — pawn slide captures with knockback, wrong-move/wrong-capture indicators, a tap-me hint hand, confetti celebrations and smooth tween-driven transitions on every screen.

Level Generator (PCG)

  • Deterministic seeds — every level is 100% reproducible: the same seed and configuration always produce the same board (mulberry32 PRNG with per-level derived seeds).
  • Solvable by construction — boards are generated backward from the terminal state (the King alone) by undoing captures of a winning line, so every level is guaranteed solvable — even after the star is captured (star-safe).
  • One-command CLInpm run levels:generate regenerates a full level set, tunes board size (4×4–8×8), piece pool, difficulty band, star and Queen presence, sorts batches by difficulty and writes ready-to-import TypeScript.
  • Difficulty measurement — real graph metrics (minimum move count, branching, dead-end rate, solution count) are normalized into a 0–100 score mapped to six bands: very-easy, easy, medium, hard, expert, insane.
  • Validation built in — hand-authored levels can be verified with the same solver (--validate), and the in-game hint system runs the identical solver, so hints always agree with the generated puzzles.

Template Features

  • Reskin-ready with a dedicated reskin guide and comprehensive documentation.
  • Complete documentation including architecture overview, gameplay rules, asset catalog, scenes flow, reskin guide and level generator guide.
  • Deterministic PCG pipeline — a seed-driven level generator CLI that guarantees solvable, star-safe levels, measures difficulty and can sort entire level batches.
  • Clean, extendable architecture — isolated managers with callback-only communication (no EventEmitter), making the codebase easy to read, debug and extend.
  • Designed for 1920×1080 (16:9 landscape) with auto-fit scaling on desktop and mobile browsers.

Supported Browsers

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Opera

Tech Stack

  • Phaser 4.0.0 (HTML5 game framework).
  • TypeScript 5.7
  • Vite 6.3

Asset Credits

  • GrafxKid (itch.io)
  • BDragon1727 (itch.io)
  • Nikoichu (itch.io)

0 average based on 0 ratings.

gridmazestudio

gridmazestudio

Visit Author's Portfolio

View Portfolio
Last Update 2026-08-21
Created 2026-08-21
Sales 0
Discussion Comments
Compatible Browsers Firefox Safari Opera Chrome Edge
Software Version Other
High Resolution No
Files Included JavaScript JS HTML CSS
Video Preview Resolution
Search plugins
Browse Categories

Bluehost Shared Hosting