devlog # 1
hi! i made this project cuz i rlly love chess but want to have more controls over these types of sites. eg. chess.com has paid features and lichess is free but it doesn’t have a good, refined ui that i would prefer.
i spent like 3 hours on this first session just trying to get a basic board to load on the screen 😅 😭 . it was a bit of a struggle but it is finally working.
the setup struggle
i started with vite for the site but it kept fighting with the hack club spaces proxy. the server kept returning html instead of javascript modules, which caused errors in my console and crashed everything. i decided to swith entirely to a static website. now there is no node_modules or package config. just the three files: index.html, style.css, and main.js.
the 404 fix
even after going static, the board wouldn’t load. i checked the console and found a 404 error. turns out the chess.js version i tried to import didn’t actually exist on npm. i switched the import map to use a verified esm release on the cdn, and the board finally appeared.
adding nice features
once it was running, i added right-click support so you can draw green arrows and highlight squares (it still doesn’t work all the time, i can guarantee support by next devlog). i also set up auto-flipping. after you make a move, there is a 400ms delay so the piece finishes its animation, and then the board smoothly spins 180 degrees for the other player.
whats next
next up is showing the list of moves on the side. I also plan having local LAN game!!! However idk i have to research. Maybe after LAN, i could make my own server in my vm from Hack Club Nest!
PS.
there r screenshots below pls look at them PLS PLEASE PLEASE…
give me suggestions…
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.