ChessGame banner

ChessGame

41 devlogs
31h 53m 32s

This project is an Interactive Chess game that allows two players to play on a digital board.it foloows standard chess rules ,including valid moves,turn -based gameplaya and piece capturing

This project uses AI

I use Ai for code debugging, some styling and readme

Demo Repository

Loading README...

prakashpvp2007

Shipped this project!

i built a responsive chess web game using HTML,CSS and javascript .it includes a lobby screen ,settings (side /sound/suggestion/timer),full chess rules (castling,en passant ,promotion) ,move history,captured piece tracking ,draw claims(50-move and threefold) and PGN download, i also added desktop drag-and-drop plus custom mobile touch-drag with a floating piece preview game play ,the hardest part is handling legal move validation while keep the king safety checks accurate

prakashpvp2007

i write readme file for this game that contains game features , controls , buttons , settings , chess rules , mobile responsive

Attachment
0
prakashpvp2007

i have updated the moves popup in the mobile view previously the popup appeared alongside the board without much visibility now the background is blurred ,making the moves popup stand out and easier to focus on

Attachment
0
prakashpvp2007

in the previous update the drag-and-down feature disabled the click -to-movefunctionality.i have now fix this issue

Attachment
0
prakashpvp2007

I have improved the drag-and-drop feature in the mobile view previouly only the valid squares and the landing square were highlighted in blue color box ,but now the piece itself moves smoothly during dragging .this update enhance the visual experiences and makes the game feel more natural

Attachment
0
prakashpvp2007

i have implemented the drag-and-drop piece movement for mobile ,previously ths feature was available only on the web, but now it works on both mobile and web platforms this makes it easier for users to move pieces during the game

Attachment
0
prakashpvp2007

i have updated the UI to be responsive across multiple devices including mobile, tablet, full-screen web,and half-screen web views .i have also restricked the game in mobile landscape mode mode to maintain a better user experiance making the game fully responsive across all these screen size was quite challenging so i used AI assistance in several areas to speed up the development process and handle complex layout adjustments

Attachment
Attachment
Attachment
0
prakashpvp2007

i have updated the mobile view of the game i repositioned the captured pieces section to opposite sides of the board for better layout on smaller screen i also hide the move details by default and add a moves buttn when clicked it displays the move list.making the game mobile responsive was very difficult for me so i use Ai at some parts to speed up the development

Attachment
Attachment
Attachment
Attachment
Attachment
0
prakashpvp2007

i have updated the timer section in the settings by arranging the four options in a single row to reduce the overall height of the panel .Additionally i have removed the undo and redo buttons when the timer is enabled ,since those options are not appropriate during timed gameplay.undo and redo are now available only when the game is played without timer

Attachment
Attachment
Attachment
0
prakashpvp2007

i have implemented timer setings in the settings tab users can choose from predefined options such as 5 min ,10 min or no timer ,and there is also a custom timer option for setting a preferred duration.

Attachment
Attachment
0
prakashpvp2007

I have implemented a sound on/off option in the settings tab.this allows to easily enable or disable all game sounds based on their preference.

Attachment
0
prakashpvp2007

i have updated the panel behaviour .previously the panel position remained fixed even when the board orientation changed (white or black) now the panel adjusts dynamically based on the players side aligning correctly with correct board position. Additionally i have implemented a points system for pieces and the point differences is displayed near the captured by black and captured by white sections

Attachment
0
prakashpvp2007

i have updated the text buttons for undo,redo,reset into icon based buttons which looks better .i have also set an icon for this game.

Attachment
0
prakashpvp2007

i have moved the download moves feature from the panel to the game over popup previously it was available during the game ,but downloading moves in the middle of a match was not ideal.now the option appear after the game ends allowing users to review and download complete move list for better analusis

Attachment
0
prakashpvp2007

I have updated the settings to include a show and hide option for move suggestions.when it is show selected a piece displays all its legal moves and captur options .when it is hide these indicators are hidden ,allowing for a more challenging and professional gameplay experience

Attachment
Attachment
Attachment
0
prakashpvp2007

i have implemented the player selection option in settings ,allowing the user to choose to play as white or black.if white is selected,white pieces appear on the user,s side and black pieces on the opposite side and vice versa i have also added svae button in the settings.

Attachment
Attachment
0
prakashpvp2007

i have implement a settings option in the game lobby ,currently it is empty but i plan to add features soon ,i havealso add game over popup to improve overall user experience.

Attachment
0
prakashpvp2007

I have added a lobby screen to the game with an improved and visually appealing UI the lobby features styled chess pieces placed in the background ,creating an engaging look.it includes a start game button and when the user clicks it the game begins

Attachment
0
prakashpvp2007

I ahve added sound effects for various game events,including game start,move selection ,opponent moves ,check,capture,castling ,promotion ,illegal moves and game end this makes the game more ideal

Attachment
Attachment
0
prakashpvp2007

i have updated the drag-and-drop movement feature.previously legal moves and capture options where not displayed while dragging a piece this issue has now been fixed now valid moves and captured are shown during drag

Attachment
0
prakashpvp2007

I have implemented a drag-and-drop movement feature .pkyers can noww move pieces by dragging them and placing them in valid squares.if a piece is droped on an invalid square it automatically returns to its original position this improves the user eperiences and makes the gameplay more better

Attachment
0
prakashpvp2007

I have updated the Ui to be responsive for both web and mobile devices . i also improved the captured piece logic -previously back captured pieces were shown on the black side and white captured pieces on the white side ,which was not ideal.now captured pieces are displayed on the opponents side.

Attachment
0
prakashpvp2007

I have updated the implementation of the 50-move rule and thressFold repetaion. previously these draws were applied automatically,but now they must be claimed by the player when the condition are met the user is given an option to claim draw and if they choose to do so the game is declared as draw

Attachment
Attachment
0
prakashpvp2007

I have implemented the threefold repetition drw rule. this occurs when the same board position is repeated three times during the game. when this happens the game is declared a draw . this exsures the game follows standard chess rules

Attachment
0
prakashpvp2007

I have implemented the 50 move draw rule.if both players make 50 consicutive moves without any pawn movement or piece capture ,the game is declared a draw.this follows standard chess rules and help to prevent endless gameplay without progress

Attachment
0
prakashpvp2007

I have implemented a feature to download the game’s move history as a PNG file. the downloaded image includes details such as the round ,result and date along with the complete list of moves .this allows players to eassily save and share their games

Attachment
Attachment
Attachment
0
prakashpvp2007

I have implemented a feature to highlight the king when it is under check.

Attachment
0
prakashpvp2007

i have implemented insufficient material draw condition in the game ,the game is declared as draw when checkmate is impossible ,such as king vs king,king vs king + bishop,king vs king + knight an king + bishop vs king + bishop when boath bishops are on the same color squares ,this ensures the game correctly follows the rules

Attachment
Attachment
Attachment
0
prakashpvp2007

i have implemented move notaion in the panel, a “+” suffix is added to a move when it results in a check ,and a “#” suffix is added when it results in a checkmate. this helps players to easily identify critical moves and understand the game

Attachment
Attachment
0
prakashpvp2007

I have implemented checkmate and stalemate consitions.when the king is in check and there are no legal moves available it is considered checkmate.when the king is not in check but there are no legal moves left ,it is consider a stalemete

Attachment
0
prakashpvp2007

I have implemented check conditions in the game.when the king is under check ,players can only make moves that resolve the check.this includes moving the king to a safe square,blocking the attacking piece or captureing the attacking piece.Other moves that do not address the check are restricked,this makes the game follows proper chess rules and improves gameplay accuracy.

Attachment
Attachment
0
prakashpvp2007

I have implemented the castling move in the game. castling allows the king and rook to move simultaneously to safer positions on the same side this move is only possible if neither the king nor the rook has moved before. additionally the king must not be in check and the squares between the king and rook must empty.this feature improves the accuracy of the game by following standard chess rules

Attachment
Attachment
Attachment
Attachment
Attachment
0
prakashpvp2007

I have implemented the en passant rule.this move becomes available when an opponent moves their pawn two squares forward from its starting position and your pawn is positioned on an adjacent square(left or right) .In this case you can capture the opponents pawn as if it had moved only one square forward .this capture must be made immediately on the next move.

Attachment
Attachment
Attachment
0
prakashpvp2007

I Have Implemented pawn promotion .when a pawn reaches the opponent’s end of the board,it can be promoted to a queen,bishop ,knight or rook.A popup is displayed to the user,allowing them to choose the piece for promotion

Attachment
Attachment
Attachment
0
prakashpvp2007

I have updated the game to highlight both the previous and current square of a move.
this helps the opponent easily identify which piece was moved,imroving the overall gameplay experience.

Attachment
Attachment
0
prakashpvp2007

I have updated the undo ,redo and reset functionality.the undo button revert the game to the previous move,while the redo button moves forward to the next move (only if undo has been used) .the reset button completely resets the game from the beginning.

Attachment
Attachment
Attachment
Attachment
0
prakashpvp2007

I have updated the move panel to use a fixed height with a scroll feature .previouly its height increased as more moves were added ,which made the ui look inconsistent,now it remains fixed and crollable for better layout control.
i also adjusted the height of the black and white captured pieces section .additionally ,i moves all stylings fromjs to css ,using class names instead.this reduces the amount of code in js and makes the codebase cleaner and more maintainable

Attachment
Attachment
0
prakashpvp2007

I have updated the panel to display block captured pieces ,white captured pieces ,move details.pieces captured by black are shown on the black side ,pieces captured by white are shown in white side ,In the move section ,each displays the pieces involved with its image and its destination square on the chessboard,if the move is a capture move it is indecated with an x prefix

Attachment
0
prakashpvp2007

i have enhanced the game logic by implementing movement rules for each pieces ,now every pieces moves according to its rules including valid path checking and restrictions when a piece is clicked all its valid moves are displayed as dots on board making it easier for players to understand possible moves ,i have also added capturing mechanics allowing pieces to attack and capture opponent pieces when a valid move is made.

Attachment
Attachment
Attachment
Attachment
0
prakashpvp2007

I have implemented a sidebar panel that displays captured pieces, with black pieces on the white side and white pieces on that black side , along with move details ,the panel also includes undo,redo,and rest buttons to manage game actions and enhance better the visibility of game informtion

Attachment
0
prakashpvp2007

Now i have updated the board responsive also for mobile

Attachment
Attachment
0
prakashpvp2007

i have begun developing the chess game .In the initial phase ,I designed the board,added images for the pieces and successfully set up the full chessboard with all pieces in thier correct positions

Attachment
0