openjack is blackjack against the dealer, played with play chips. Bet, then hit, stand, double, or split.

openjack is free, open source, and has no tracking.

How to play

Rules

  • Get a hand closer to 21 than the dealer’s without going over.
  • Number cards count their value, face cards count 10, and an Ace counts 1 or 11.
  • Hit, stand, or double down on any two cards. A double doubles the bet and takes exactly one more card. A hand that reaches 21 stands on its own.
  • Split two cards of the same value into separate hands, up to four. Split Aces take one card each, and 21 on a split hand is not a blackjack. A split hand can be doubled.
  • When the dealer shows an Ace, insurance is offered for half the bet and pays 2:1. With a blackjack, the offer is even money instead: 1:1 straight away, whatever the dealer holds.
  • The dealer checks for blackjack under an Ace or a ten before the hand is played, then draws to 17.
  • Blackjack pays 3:2. A tie is a push, and the bet is returned.

House rules

OptionValuesDefault
Decks1, or a 6-deck shoe6
Soft 17dealer stands, or hitsstands
Surrenderoff, or late surrender for half the betoff

These are set under Options in the menu, and apply from the next hand. The shoe is reshuffled between hands once three quarters of it has been dealt.

Betting

  • The bankroll starts at 1000. The minimum bet is 50, and the bet changes in steps of 50, so every payout is a whole number of chips.
  • A bankroll that falls below the minimum bet is reset to 1000.
  • Chips are play chips. There is no real money, nothing to buy, and nothing to win.

Controls

Mouse and keyboard, on computers and in desktop browsers:

InputAction
Click a buttonPlay the hand
H / S / DHit / Stand / Double
P / RSplit / Surrender
I or Y / NTake insurance or even money / decline
Left, Down, - / Right, Up, +Lower / raise the bet
Enter / SpaceDeal, or start the next hand
EscapeBack to the menu. The game can be resumed
Alt+EnterToggle fullscreen
Up / Down, Enter / SpaceMenu navigation. Left / Right change a value in Options

Touch, on phones, tablets, and mobile browsers:

GestureAction
Tap a buttonPlay the hand
Tap the title bar or the status line, or two-finger tapBack to the menu. The game can be resumed
Tap a menu rowChoose it. In Options, a tap cycles the value
Swipe up / downMove the menu selection. Left / right change a value

Cards are dealt one at a time and the dealer’s hidden card turns over. The buttons appear once the cards have landed.

Where to play

  • Browser: play it here. Nothing to install.
  • iPhone and iPad: submitted to the App Store and pending review. 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.
Download openjack on the App Store

Technical details

Source code: github.com/dannyheskett/openjack, MIT license.

Code

  • Written in C.
  • The rules (src/game.c) and the table layout (src/layout.c) are platform-independent. Every platform uses them unchanged. Unit tests cover both and need no window.
  • 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.
  • The cards are drawn, using the same card art as openklondike. Sound effects are synthesized at startup. The Nunito typeface is embedded in the binary. There are no asset files.
  • The browser version is the same C compiled to WebAssembly with Emscripten.

Layout

One layout serves every screen. Each frame the table is fitted to the window: the buttons sit in a band along the bottom or in a column down the side, and split hands take one row or two, whichever leaves the cards largest. It works in a desktop window and in both orientations on phones and tablets. Cards are one size for the whole screen, so nothing moves when a hand is split.

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. 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.