https://github.com/halaway/qt-chess-engine
An interactive chess engine integrated into a Qt6.5 program designed for running as a native and browser-based GUI application, built with C++, CMake, Qt Creator, Emscripten, and compiled for WebAssembly.
https://github.com/halaway/qt-chess-engine
cmake cpp emscripten qt webassembly
Last synced: 5 months ago
JSON representation
An interactive chess engine integrated into a Qt6.5 program designed for running as a native and browser-based GUI application, built with C++, CMake, Qt Creator, Emscripten, and compiled for WebAssembly.
- Host: GitHub
- URL: https://github.com/halaway/qt-chess-engine
- Owner: halaway
- Created: 2024-09-13T15:30:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T02:20:01.000Z (over 1 year ago)
- Last Synced: 2025-04-01T03:51:18.776Z (about 1 year ago)
- Topics: cmake, cpp, emscripten, qt, webassembly
- Language: Makefile
- Homepage: https://halaway.github.io/Qt-Chess-Engine/
- Size: 9.26 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Qt Chess Engine
[](https://github.com/halaway/Qt-Chess-Engine/actions/workflows/static.yml)
> A Qt6.5 program for developing native and browser-based GUI applications,
built with CMake, Qt Creator, and Emscripten, featuring a fully interactive Chess engine.
## Description
As a final build, this project focuses again on the Qt Framework and creates a cross-platform graphical user interface for playing a game of Chess.
Qt handles widget customization, piece renderings, and event handling while the Board class manages positional logic, game rules, and piece interactions.
As before, this project makes use of WebAssembly, a binary instruction format, capable of running alongside Javascript inside a
virtual environment such as a web browser. Emscripten will again be used to compile the C++ application into WebAssembly (WASM) and JavaScript (js) files
and finally deployed to be used across the web.
## Getting Started
### Dependencies
* Qt 5/6
* CMake
* Launch Qt VSCode Extension
* GCC (Linux/macOS) – C++ compiler (install via ```apt``` or ```brew```)
* Clang (macOS/Linux) – C++ Compiler (x86/x64)
* Xcode Command Line Tools - Required for macOs
* Emscripten – Compiling C++/C projects to WebAssembly
## Building
### VSCode macOs
Running on mac using VSCode requires the Launch Qt Extension along with CMake.
Using WebAssembly for browser compilation requires setting system Path for Emscripten: ```source "$HOME/emsdk/emsdk_env.sh" ```
To Run:
```
- cd build
- cmake ..
- cmake —-build .
- open ChessGame.app
```
### Qt Creator
Using the Qt IDE:
```
- Run cmake
- Run
```
To run the application on a web browser using Qt Creator, ensure that compatible versions of Emscripten and WebAssembly are installed. Then
set the Devices' Emscripten SDK path ```/users/path/to/emsdk/```
and Build using the WebAssembly Qt Kit.
## Native Desktop GUI Build

## WebAssembly Based Browser Build
