ChessView is a fully-featured chess game library for Android, built with Kotlin. It delivers smooth interactions, realistic piece movements, and a highly customizable interface — including board themes, piece styles, sound effects, and stroke options.
It includes complete gameplay logic: legal move validation, turn-based play, and piece movement rules. You can play against an AI powered by Gemini, or extend it for multiplayer support with the same seamless experience.
Designed for easy integration via XML or code, ChessView brings full chess functionality to any Android app with just a few lines of code.
- Customizable board square colors
- Filled or outlined chess piece styles
- Multiple piece font styles (Standard, Classic, Merida, Symbola)
- Optional bold styling for symbols
- Stroke and border customization
- Sound effects for piece movements and interactions
- Smooth and realistic piece movements
- Legal move validation and turn tracking
- Play against AI (powered by Gemini)
- Multiplayer-ready structure
- Standalone game or library integration
- Easy XML or Kotlin integration
- Fully documented source code
- Responsive Chessboard: Adjusts to different screen sizes
- Customizable Chess Pieces: Personalize piece colors, styles, and strokes
- Pawn Promotion: Automatically promotes pawns
- Highlight Selected Squares: Visual cues for selections and valid moves
- Turn Indicator: Displays whose turn it is
- Touch Input Support: Select and move pieces by tapping and dragging
- Dynamic Square Colors: Customize light and dark square colors
- Custom Stroke Effects: Add customizable strokes to pieces and squares
Add the following to your build.gradle
(project-level):
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Then add the dependency in your app-level build.gradle
:
implementation 'com.github.Jumman04:Jummania-Chess-Game:1.0'
<com.jummania.ChessView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:chess="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/chessView"
chess:lightSquareColor="#fadeaf"
chess:darkSquareColor="#8e4f19"
chess:isDarkFilled="true"
chess:isLightFilled="true"
chess:enableStroke="true"
chess:pieceDarkColor="#000"
chess:pieceLightColor="#fff"
chess:strokeLightColor="#000"
chess:strokeDarkColor="#000"
chess:symbolStyle="symbola" />
chessView.setSoundEffectEnabled(true)
chessView.setBackgroundColor(Color.WHITE)
chessView.setPieceStyle(true, true, Color.WHITE, Color.BLACK)
chessView.setSquareColors("#fadeaf".toColorInt(), "#8e4f19".toColorInt())
chessView.setEnableStroke(true, Color.BLACK, Color.BLACK)
chessView.setSymbolStyle(SymbolStyle.SYMBOLA.ordinal, useBoldSymbol = false)
The game offers extensive customization, allowing you to tailor the appearance and behavior of the chessboard and pieces:
- Light Square Color (
lightSquareColor
) - Dark Square Color (
darkSquareColor
)
- Light Piece Color (
pieceLightColor
) - Dark Piece Color (
pieceDarkColor
)
- Enable Stroke (
enableStroke
) - Stroke Color for Light Pieces (
strokeLightColor
) - Stroke Color for Dark Pieces (
strokeDarkColor
)
- Symbol Style (
symbolStyle
)standard
: Default system font.classic
:chess_alpha.ttf
(Classic chess font).merida
:chess_merida_unicode.ttf
(Merida chess font).symbola
:symbola.ttf
(Unicode chess symbols).
- Enable Sound Effects (
enableSoundEffect
): Enable or disable sound effects for piece movement.
- Kotlin: The primary language for Android development.
- Android Studio: Integrated development environment used to build and test the game.
- Custom Views: Custom
ChessView
class handles drawing the chessboard, pieces, and other visual elements. - Sound Effects: Integrated system sound effects for piece movements and interactions.
- Material Design: Material design principles are used for clean and consistent UI elements.
This project is licensed under the MIT License - see the LICENSE file for details.