Page 1 of 1

Ren'Py Chess Engine Source Code

Posted: Sat Oct 31, 2020 1:20 pm
by r3dhummingbird
Itch.io link: https://r3dhummingbird.itch.io/renpy-chess-game

I built a chess GUI built using python-chess https://github.com/niklasf/python-chess and Stockfish (for chess AI). You can use it as a standalone playable or integrate it as a minigame into a Ren'Py visual novel project. The source code is available inside the game folder. Feel free to post feature requests (or bug reports if any) on the itch.io page.

Gameplay
The game supports Player vs. Player and Player vs. Computer. In PvC, player can choose to play as either Black or White.

Click on a piece and all of its available moves will be highlighted in blue. Click on any of the legal destination squares to make a move. Press Flip board view to flip the view, with White on the bottom by default.

Image

Flip-board view
Image

Pawn promotion
Image

Image

Image

Image

Re: Ren'Py Chess Engine Source Code

Posted: Sat Oct 31, 2020 4:30 pm
by Imperf3kt
Is this built on top of viewtopic.php?f=51&t=50997 ?
You may want to check the checkmate conditions, I once got an error instead of losing but didn't take note of how.

Re: Ren'Py Chess Engine Source Code

Posted: Sat Oct 31, 2020 5:58 pm
by r3dhummingbird
Imperf3kt wrote:
Sat Oct 31, 2020 4:30 pm
Is this built on top of viewtopic.php?f=51&t=50997 ?
You may want to check the checkmate conditions, I once got an error instead of losing but didn't take note of how.
Thanks for the comment! That was actually my account from two years ago :D This time I didn't implement all the chess backend logic from scratch but used python-chess: https://github.com/niklasf/python-chess. If there is a bug with the chess logic/stockfish engine that's probably hard to fix. I'm happy to look at the logs if anyone runs into any more crashes.

Re: Ren'Py Chess Engine Source Code

Posted: Mon Jan 18, 2021 11:20 pm
by Autumnotopia
Oh, cool! I was using your previous version in my VN, so I'm excited to look over the new one :D