Table of Contents

♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ Multiplayer
♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟ Chess
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙ with
♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖ WASM!

Has this already been done to oblivion and far better by Tolido Nano-Chess?  Yes!  So I did it again!

You can find all the code on my GitHub and you can also play the live version!

It’s this, but far larger and interactive!

A B C D E F G H
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ 8
♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟ 7
                6
                5
                4
                3
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙ 2
♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖ 1

Running This Locally🔗

You’ll need all the WASM tools:

rustup target add wasm32-unknown-unknown # This installs almost instantly
# This set of installs *may* slow down your computer for a little while
# or even freeze it for a new mins if its not the fanciest
cargo install wasm-bindgen-cli
cargo install wasm-gc
cargo install wasm-opt

Then just . run.sh (if you’re on Linux…)

Todo🔗

Behind the Times!

The Todo lists on this page are pulled directly from the GitHub README.md every time this website is built.  However, as this website is only built every so-often, it might not be up to date.

  • WASM connect in & show the pieces
  • Make it possible to move pieces
  • Move validation
  • GitHub pages for it pls (statically host the www/index.html?) (and link it here)
  • Make it possible to take pieces
  • https://en.wikipedia.org/wiki/Rules_of_chess
  • Semi-Multiplayer with URL encoded move histories for sharing
    • Long algebraic probably
  • Show the move histories from the URL
See the live/active list here

Future Fancy Features🔗

Things that would be nice to do once we have this properly working

  • An option to undo the move you just did (aimed at mobile misclicks)
  • Confirmation if someone wins
  • If in check, all moves that don't get you out of check are invalid
    • Visual highlighting that you're in check?
  • Make sure the text line-height and table row-height are exactly the same (they currently aren't)
  • Add async so we can make a 200ms per move recap of where we are?
    • Or figure out how to use setInterval from WASM?
  • A little red flash or something when an invalid move is attempted?
  • Little ghosts showing all valid moves (with arrows for valid in-between moves)
  • Flip the horsey on the left so it looks prettier
    • This would require tracking the left horsey down from all it's previous moves
  • Something subtle to mark who's turn it is?
  • A share button that uses navigator.share() from the Web Share API (if available)
See the live/active list here

Title Unicode Chess
Created 2024-11-17
Published 2024-11-23
Last Updated 2024-12-01
Draft false

Tags: Game, WASM