opencheckers is checkers (American or English draughts) against the computer.
opencheckers is free, open source, and has no tracking.
How to play
Rules
- An 8×8 board with 12 pieces a side. Red moves first.
- A man moves one square diagonally forward, and captures by jumping diagonally forward. A king moves one square diagonally in any direction, and captures by jumping diagonally in any direction.
- Captures are mandatory. A multi-jump continues with the same piece until it has no further jump.
- A man that reaches the far row becomes a king. That ends the turn.
- A player with no pieces, or no legal move, loses.
Options
Set under Options in the menu. Changes apply from the next New Game.
| Option | Values |
|---|---|
| Difficulty | Easy, Medium, or Hard |
| You Play | Red or Black |
Controls
Mouse, on computers and in desktop browsers:
| Input | Action |
|---|---|
| Click a piece | Select it. Its legal moves are marked with dots |
| Click a dotted square | Move there. During a multi-jump the piece stays selected until the jumps end |
| Escape | Back to the menu. The game can be resumed |
| Alt+Enter | Toggle fullscreen |
| Up / Down, Enter / Space | Menu navigation. Left / Right change a value in Options |
Touch, on phones, tablets, and mobile browsers. There are no on-screen buttons:
| Gesture | Action |
|---|---|
| Tap a piece | Select it. Its legal moves are marked with dots |
| Tap a dotted square | Move there |
| Two-finger tap | Back to the menu. The game can be resumed |
| Tap a menu row | Choose it. In Options, a tap cycles the value |
Where to play
- Browser: play it here. Nothing to install.
- iPhone: on the App Store. iOS 15 or later.
- Android: install the APK from the latest release. It is not on Google Play.
- Windows, macOS, Linux: download the archive for your system from the latest release.
Technical details
Source code: github.com/dannyheskett/opencheckers, MIT license.
Code
- Written in C.
- The game logic and the computer player are one platform-independent file,
src/game.c. Every platform uses it unchanged. Unit tests cover it and need no window. - The computer player is an alpha-beta search 2, 5, or 7 plies (half-moves) deep on Easy, Medium, and Hard.
- Drawing, input, and audio use raylib 6.0 on Windows, macOS, Linux, Android, and the web. iOS uses its own Metal and UIKit backend with no raylib.
- Pieces are drawn from shapes. Sound effects are synthesized at startup. The Nunito typeface is embedded in the binary. There are no asset files.
- The computer’s pause before it moves is timed on a fixed 60 Hz step, not on the frame count, so it is the same length on a 120 Hz phone and in a browser tab.
- The browser version is the same C compiled to WebAssembly with Emscripten.
Layouts
There are two renderers. Each build uses one.
- Landscape, on desktop: the board is a fixed size, centred in a resizable window, with a title bar above and a status bar below. It shrinks only in a window too small to hold it.
- Portrait, on iOS and Android: fitted to the screen. A title bar, then a status band showing whose move it is, the difficulty, and the piece counts, then the board at the largest square that fits the width.
The web build includes both. It picks portrait on a touch screen (pointer: coarse) and landscape otherwise.
Recording
Desktop builds record the session to an H.264 MP4 file, one video frame per rendered frame, with no external tools. Turn on Record in the menu, or start with --record or --record <file>.mp4. The board is rendered at a fixed size and supersampled for the recording. Mobile and web builds do not include the recorder.
Builds and releases
Every push to main builds and publishes a release: Linux x86-64, macOS universal, Windows x64 and x86, an Android APK, an iOS .ipa, and the WebAssembly bundle. The .ipa is the App Store build and cannot be sideloaded. Build instructions are in the README.