Chess in Raylib

This is a standard game of chess, written in C++ using Raylib during my free time. The game is still under development and lacks some major features, but it supports all the main moves for all the pieces and can be used as a normal chessboard.

The main features that are currently not supported are:

  • Castling
  • Checking for pieces that are in the path of certain pieces
  • Checkmate

To use this repository, you need to have Raylib installed. However, if you don't want to go through the installation process, you can simply test the game by launching the .exe file included in the raylib_template directory.

Images

Here are images showing the game from different player perspectives. The board's color indicates the current player's turn:

  • Red-Black -> Black Piece Turn
  • Blue-White -> White Piece Turn

How to use:

To compile:

root folder> g++ src/main.cpp src/rook.cpp src/king.cpp src/pawn.cpp src/chessBoard.cpp src/chessPiece.cpp src/queen.cpp src/knight.cpp src/bishop.cpp src/utilities.cpp -I include -L lib -lraylib -lopengl32 -lgdi32 -lwinmm -O1 -Wall -Wextra

To run:

  • CMD: a.exe
  • PowerShell: ./a.exe
  • Unix-based Terminals: ./a