HOME

Chess By Me

Browser game of chess with functioning rules and clock

Visit Live Site
Tech:JavaScriptHTMLCSS

Overview

Fully playable chess game built from scratch using the HTML canvas API, focusing on accurate rule enforcement, game state management, and real-time interaction without external libraries. Fully envisioned and written by me without outside help or inspiration.

Key Features

  • Complete implementation of chess rules, with legal move validation, check / checkmate detection, castling, en passant, promotion
  • Drag-and-drop piece interaction with visual feedback
  • Legal move highlighting (valid vs invalid states)
  • Real-time move notation log (standard algebraic notation)
  • Local multiplayer (same device)

Technical Highlights

  • Board representation using a 2D array with piece instances (Piece class)
  • Move generation pipeline: each piece computes pseudo-legal moves, then moves are filtered via simulation to ensure king safety
  • Check detection system handling complex constraints (pinned pieces, multiple checks)
  • Canvas rendering where board state is mapped to pixel coordinates in real time

Challenges Solved

  • Designing a performant move validation system without excessive recursion
  • Handling edge cases like pinned pieces and multi-source checks
  • Keeping rendering and game logic in sync in a real-time loop

What This Demonstrates

  • Strong understanding of state-driven systems
  • Ability to implement complex rule engines from scratch
  • Problem-solving without reliance on frameworks or external libraries

My Role

Made fully by me without external libraries or code generation tools.

Chess By Me