Open comments for this post
UPDATE #7
i wanna have the time logged for shipping but basically all i did was change some file formats for web assembly and turned down the resolution so that it would automatically scale so that it’s playable.
I’m currently in the process of converting the game from pygame to c++ raylib since i know c++ already and c++ is better for WASM thats about ittttttttt
live ver: https://thestarviper.itch.io/chess-engine
Open comments for this post
UPDATE #4
I fixed preformance :D heres how:
- i drew the move log table 3x per frame instead of once so i made it do it once now
- was calculating if someone was in checkmate every frame which was checking if anyone had legal moves every single frame, changed it to check for checkmate on clicks which is every time someone made a move
- some of the stuff we were rendering were static background elements that never changed and they were being drawn every frame. So instead we render them once at the start and cache it so that we don’t render static elements so many times.
(i accidentally changed the opacity of the background and dont feel like retaking the screenshot and accidentally moved the sidebar)
FPS my machine 30-40 -> 200+
FPS itch.io 10 -> 45
we still have a ways to go to get a fully smooth experience but 10 to 45 fps from the demo link is much much more playable and i thought i would get a devlog out.
next update ill continue to optimize and polish to get ready to ship!
Open comments for this post
UPDATE #3
things added in this update:
- added a subtle background
- added a sidebar
- added “Game Log” text
- moved board and bar to the right a bit
- added a GitHub readme
- rounded corners of chess board and other stuff
Issues:
I started to notice the rendering of my chess pieces moving were slightly lagging, after doing a performance test of my code using python’s profile tool i noticed that my logic for getting legal moves was called 160k+ times and my pieces were rendered 50k+ times. This made my chess engine run at 30-50 fps so i will have to fix the performance issues soon. Next update will prolly be addressing these issues and adding more UI changes
Open comments for this post
UPDATE #2
things added in this update:
- created an itch.io page to demo the game by compiled the PYgame with pygbag
- added a move log with the ability to look back in time
- legal move dots now enlarge on hover
i plan on actually making the itch.io page look good and actually add a readme to my github repo that looks good but i plan on doing that later.
next update i think will be gui changes then after that i will work on QOL changes then feature additions like variants
Fully functional game though and i did work on my laptop without wakatime so sad it wasnt tracked :c
Open comments for this post
UPDATE #1
I have created using pygame a chess engine complete with all of the rules of chess and is fully playable for local 1v1 with the features:
- on piece hover, piece tilts a bit
- piece moves to next square instead of teleporting
- checkmate
- resign and draw buttons
- stalemate
- 3 fold repetition
- 50 move rule
- en pessant
- castling
- captured pieces are shown on the side that captured them
- captured piece zone is aligned to board
- pawn promotion
FUTURE IDEAS:
- SFX
- Better GUI on loss/draw screens
- Better GUI for promotion
- Main menu
- variants (atomic,duckchess,giveaway chess, Horde, etc)
- time control
- bots (pinging chess.com api idk how to code a chess bot from scratch)
- color change of boards
- better graphics for pieces
- move log
- when hovering on dot of the move you want to make the dot becomes bigge
- pull and drag pieces around board to make moves like chess.com