C++ chessboard renderer with SDL2, ASCII, and NCurses on the top of GNUChess UCI server protocol.
- SDL2 Mode: Graphical chessboard with smooth rendering (default)
- GNUChess UCI: protocol integration
- Bitboard validations: improvement using bit arrays of 64 bits
- Picocalc Luckfox Lyra: Optimized for this mod and board
- FEN notation support: Basic game state loader via CLI argument
- Fast game states: Save and load bookmarks with small preview
- NCurses Mode: Terminal UI with keyboard navigation (in progress)
- Cross-platform: Works on Linux, Windows, and macOS
- ASCII Mode: Terminal interface with Unicode pieces (inprogress)
- GNUChess
- CMake (>= 3.10)
- C++11 compatible compiler
- SDL2 development libraries (ttf and image dev libraries)
- Yaml cpp library
- NCurses development libraries (optional, for interactive terminal mode)
# Install development libraries
sudo apt update
sudo apt install gnuchess cmake build-essential libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libncurses-dev libyaml-cpp-dev
# Build the project
./build.sh
# Test local execution:
./chess
# Install
cd build && sudo make installYou need first change your original Picocalc RP2040 board, with a LuckFox Lyra board, put a clean SD and follow the next steps:
git clone --recursive https://github.com/hpsaturn/picocalc-luckfox-lyra.git
cd picocalc-luckfox-lyra
./setup.sh
./build.sh all
./build.sh buildroot-make:gnuchess
./build.sh buildroot-make:chessboard
./flash.shFor details please visit the follow links:
Easy Linux build for LuckFox Lyra using Docker
Luckfox Lyra on Picocalc
I precompiled some versions regulary in releases
This version is optimized for Picocalc board using Luckfox Lyra. For that it has the next key bindings:
| Key | Action |
|---|---|
| Arrows | Piece and setting selections |
| SPACE | Select piece or setting |
| ENTER | Move selected piece |
| ESC | Deselect piece or window exit |
| F1 | Show keyboard bindings |
| F2 | Save game state |
| F3 | Load last game state saved |
| F4 | Enter to game states window |
| BACKSPACE | Delete game state (states window) |
| F5 | About and credits |
| S | Enter to settings section |
| I | Toggle to show game info |
| Q | Exit the game. (without state save for now) |
| R | Restart the game. (without ask before for now) |
| H | Help - Keyboard bindings |
Also via command line is possible load a FEN state like this:
chess --fen "r3kb1r/ppp1pppp/5n2/8/1q4P1/3b1P2/PP1N3P/R1BQK2R b - - 0 1"For more about FEN notation and details, please enter here
| Piece | ASCII | NCurses | Description |
|---|---|---|---|
| ♔ ♚ | K k | K k | King |
| ♕ ♛ | Q q | Q q | Queen |
| ♗ ♝ | B b | B b | Bishop |
| ♘ ♞ | N n | N n | Knight |
| ♖ ♜ | R r | R r | Rook |
| ♙ ♟ | P p | P p | Pawn |
Note: Uppercase letters represent black pieces, lowercase represent white pieces.
- Framebuffer support for Luckfox Lyra basic Linux buildroot image
- Adapter class for join with GNU-Chess using UCI protocol
- Picocalc keyboard issues (fixed)
- Dead pieces count in each side (Game info window)
- Basic settings modal window
- Castelling full validations
- Ilegal check moves validations (engine crashes)
- isInCheck() validations
- Help info modal window
- Game info modal window (in porgress)
- Points from the user (positive/negative)
- Basic Timers
- Buildroot config files for Luckfox Lyra tests
- Improve easy mode (seems that is not working)
- FEN casteling support
- Flip board
- Sound support
- Sprite pieces improvement
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Special thanks to my son, M.V for its continuous critics and beta tests
- Thanks to @lunokjod for his MongoIA assistant
- Thanks to Chess SDL project for its CC by SA image assets.
This project is GPLv3. Some assets they are licensed under CC BY-SA 3.0. See assets directory for details.


