its online so play with your friends or other scratchers Possible additions in the future -The ability to castle -Make a pawn turn into queen when it reaches other side -chat with opponent -gliding animation after a move -sounds if loading circle doesn't show up, click flag again
MUST BE A SCRATCHER TO PLAY I'm pretty sure that the most recent Scratch update broke this project :( it was fun while it lasted. Too complicated to fix known bugs -sometimes if there are a ton of people on, it messes up -if you have it open in a different tab, it will mess up ___________________________________________ Here is my best explanation of how this project works for those asking Matchmaking; There is one cloud variable that stores your encrypted username and keeps checking if it was changed to something else, if it detects it, it sets a second cloud variable to "1", that tells player 2's program that they are connected to someone else's game, and then each player stores the others name in a variable (after its decrypted), all later moves cloud variables represent the spaces where they moved, they also include the opponents encrypted username to make sure it is them that sent the move, not someone else playing the game. Highlighter / sending moves; The highlighter just follows your mouse but does some fancy math to always stay on a square. Once it is clicked and it is your turn, it checks if that square is your piece, if it is, then it becomes selected. It then waits for your next click and then checks if it is an empty square. If it is it goes through a ton of other tests to see if it is a valid move (large custom block, scroll to right in chess piece sprite), for that selected piece. if it is, then it sets a cloud variable to your encrypted username and the start coordinate joined together. Same thing with the end coordinate. It then changes the list that displays the game board on your computer and your opponents computer. How random stuff works; The chess piece sprite has all the costumes for all the pieces in it. It then goes all over the board and creates a clone for that specific square. The empty squares are just a blank costume. The clone at a specific space always sets its costume to that item in a list that controls all the clones. When a move is made, it swaps those items in the list. i think that was everything important, i bet nobody scrolled down this far, lmk if you did. Also probably half of the variables dont do anything because i forgot to delete them and i am scared to accidentally delete one that does something _______ / | \ | | | ________ _| | | | | | | | | ___ | | ____ / \ _ | | ___ / \ | \ | __ | \ / \ / \____________/ \_____________/