Pineapple Chess GUI
- 9 Devlogs
- 15 Total hours
Basically the visual aspect of a a chess app, letting you play moves and such, BUT EVERYTHING IS THEMED PINEAPPLES
Basically the visual aspect of a a chess app, letting you play moves and such, BUT EVERYTHING IS THEMED PINEAPPLES
I have successfully added Stockfish, an chess engine that is extremely powerful to my app. Took a bit of work, but now you can play against a bot! I have added setting to customize the game against Stockfish if you click it so there’s difficulty selection and the side chooser which lets you choose which side you want to play on. Hardest part was getting the code to work with Stockfish as Stockfish communicates via the Universal Chess Interface (UCI) protocol. The chess engine itself is basically a command line and you can put in the current position and it will spit out the best move in the command line. Its not very user friendly which is why chess GUI’s come in to play like mine, my code translates it from he UI to the command line and vice versa. UCI lets me to be able to use any chess engine I want as long as it uses the UCI protocol, meaning in the future if I decide to make my own chess engine, I can implement it to my app, but for now it will remain as Stockfish.
A LOT OF NEW STUFF. Easiest part was dark mode yay. but what took me 3 hours and was so hard to do was reseizing, what I mean is you can resize the app how ever way and it works with any screen and it always sets the board at the center, I don’t know why it took this long but I did it yay. I have attached a example of it centering it self on multiple aspect ratios.
for a very small feature, this should not have taken this long. i added 2 features, the side bar in the left for future stuff, the play button on he left allows to choose the game mode when i add the feature to be able to play bots, i want to be able to choose what I want to be able to do, either play 2 player or bots, so basically the sidebar is the foundation for future features. Then is the feature that should have taken like 10 minutes, but it took me a hour and a half. It is the feature that flips the board after every turn in 2 player mode because 2 player means 2 people are using one computer to play so the board should flip. Like it used to flip the peices were upside down, liekt he images were, and i tried to add code to make it flip but it didnt work, so then I added a seperate folder with the peices edited to be flipped, but then after implemeting that, id id some stuff it swithc the pictures to that folder only when the baord is flipped, BUT THEN IT STILL REMAINED FLIPPED. So i tried so much to finally figure out I did somehtign that amde the peices flip by themselves without editing and using the different stuff, but when i tired to remove the folder andf only use one folder wiht the peices IT STOPPED WORKING, so now I have 2 folder wiht the exact same pictures of the peices and it works😭. sry if I yapped too much but I needed to vent, In the picture attached it shows the baord flipped and the sidebar as well if you wanna see the final product of the work ive done so far. but im gieunly tweaking rn😭
added a new popup system where instead of it opening a new separate window with the popup, it is more cleaner and in the app, my next step is to add a sidebar to the left and have like a bunch of different stuff there 😄
BIG PROGRESS, fixed possible move highlights. added a move history to the side, and added draw detection for all possible draws. Next job is hopefully being able to export and import PGN.
A lot of progress has been done, I have put in all the special moves like castling, en passant, and pawn promotion. And I have also added check and checkmate detection. Also I have added UI popups that appear when you promote so you can choose what piece you want as well as the game over pop up when you checkmate and a rematch button which resets the board. So foundation of my chess game GUI is complete, I have recreated the game, I just have some small tweaks that i can do later like when you click a piece while you are in check, it still shows the viable options that don’t protect your king, but it wont let you move there but it still shows it. On top of that I also want to make the pop ups happen in game without opening a new window. But my main next step is add a move history, draw detection, which can only be done with a move history because 2 ways a draw can happen is when 50 moves have passed and a piece has not been captured, or the same position has been repeated 3 times.
I have made my chess board render pieces, show viable moves, make moves, and only allow legal moves. Not all special moves have been added like castling, en passant, pawn promotion, stalemate, or even checkmate(you can take the opponent’s king and the opponent can still move😭).
I made the Chess Board
I have started my project, most of my time was taken switching my GUI from Java Swing to JavaFX. This is just a simple window so far but we are going somewhere. This isn’t a lot but I am learning Java, so its just slow and steady progress.