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.
Flip-board view
Pawn promotion
Ren'Py Chess Engine Source Code
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
- r3dhummingbird
- Newbie
- Posts: 9
- Joined: Sat Oct 31, 2020 11:57 am
- Completed: Learn to Code RPG https://freecodecamp.itch.io/learn-to-code-rpg
- itch: r3dhummingbird
- Discord: lynn#9327
- Contact:
Ren'Py Chess Engine Source Code
Last edited by r3dhummingbird on Sat Oct 31, 2020 5:59 pm, edited 2 times in total.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Ren'Py Chess Engine Source Code
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.
You may want to check the checkmate conditions, I once got an error instead of losing but didn't take note of how.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- r3dhummingbird
- Newbie
- Posts: 9
- Joined: Sat Oct 31, 2020 11:57 am
- Completed: Learn to Code RPG https://freecodecamp.itch.io/learn-to-code-rpg
- itch: r3dhummingbird
- Discord: lynn#9327
- Contact:
Re: Ren'Py Chess Engine Source Code
Thanks for the comment! That was actually my account from two years ago 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.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.
Completed Work
Learn to Code RPG: https://freecodecamp.itch.io/learn-to-code-rpg
Learn to Code RPG: https://freecodecamp.itch.io/learn-to-code-rpg
- Autumnotopia
- Regular
- Posts: 59
- Joined: Sun May 19, 2019 8:53 pm
- Completed: Making Friends
- Tumblr: autumnotopiadev
- Github: autumngreenley
- itch: autumnotopia
- Contact:
Re: Ren'Py Chess Engine Source Code
Oh, cool! I was using your previous version in my VN, so I'm excited to look over the new one