Game · Released · October 2026

Bridge

Klondike Solitaire at a card table under a lamp: burgundy baize, cream cards drawn entirely in code, undo and hints, and the old bouncing-card cascade when you win.

lualove2dgamecardsprocedural

Screenshots

About

Bridge is Klondike Solitaire, the patience game everyone knows, set on a card table under a lamp. The cloth is burgundy baize, warmer where the light falls and darker toward the edges. The cards are cream card-stock printed in deep crimson and warm black, and their backs are bottle green with a gold lattice. A walnut rail along the bottom holds the buttons and the score.

There are no image files in the game. Every suit, pip, crown and flourish is drawn in code, and the only assets are two open-license typefaces. Bridge is the first game in a planned suite of card games, so the cards and the table are built to be reused.

The cover is a hand of five: the card back, three court cards, and the Ace of spades. That ace is the maker’s card, ringed in gold and signed “Bridge”, as old decks were.

The Cards

  • Suits are traced as smooth Bézier outlines, then triangulated once into meshes. They stay crisp at any size, from the small corner indices to the large ace.
  • Pips follow the standard layouts of a real deck, and the pips on the lower half are printed upside down, as on real cards.
  • Court cards are double-ended. Each half has a large serif letter under a small emblem: a crown for the King, a coronet for the Queen, and a plume for the Jack. The halves are divided by a fine gold diagonal.
  • Type: the indices use Old Standard, a revival of nineteenth-century book type, and the titles use IM Fell English.
  • Painted once: each card is painted into an image at the window’s true resolution, so text and edges stay sharp on any screen.

Playing

  • Drag cards, or simply click one and it goes to its best place: a foundation first, then a column.
  • Undo takes back anything, including draws and turning the waste over.
  • Hint makes the suggested card and its destination glow gold. When nothing useful is left, the rail tells you so.
  • Finish appears once every card is face up and plays the rest out for you.
  • Draw 1 or Draw 3, with classic Windows scoring and a time bonus.
  • Numbered deals: every deal has a number, and you can replay the same shuffle from the start.
  • The Ledger keeps games played and won, streaks, and your best time and best score in each mode.

While you drag, every legal destination glows faintly, and the spot where the cards would land glows brightest. Cards lift a little under the cursor, tilt as you move them, and glide home if you let go somewhere they can’t stay. A new game deals itself out of the stock, card by card. Gold dust rises from a foundation as each card lands. The sounds of the cards are generated noise, shaped to sound like paper.

And when you win, the cards leap off the foundations one at a time and bounce along the rail, leaving trails behind them, just as in the Windows Solitaire of the 1990s. The trails fade slowly, so the cloth shows through again.

The Glow-Up

The first version of Bridge was written in January 2026. In October it got a full review and rebuild, and the last image in the gallery shows the two side by side. The review found real bugs in the rules, not just in the drawing:

  • Double-clicking a card that had other cards on top of it destroyed the cards above it.
  • A foundation stayed locked to its suit after its Ace was moved away, so two foundations could claim the same suit and the game became unwinnable.
  • Moving a card down from a foundation and back up again earned points every time.
  • The hearts and spades were drawn as concave polygons, which the graphics library cannot fill, so they came out as crowns.

All of these were fixed by sending every change to the cards through a single path. Each move, draw and undo now goes through one place that checks the rules, keeps the score and remembers the history. A headless self-test plays two thousand random games and checks after every move that all 52 cards are still there and that undo puts everything back exactly.

How These Were Made

The game renders every image on this page itself. A capture mode, --shot, sets up a scene, steps the game in exact sixtieths of a second, and saves the frame at 2560×1440. The cover, the deck and the close-up of the court cards are painted at higher density, so they stay sharp when enlarged.

The numbers in the images were earned, not typed in. A simple bot plays whatever the Hint button would suggest, at a steady pace. It found the mid-game board by playing through six hundred Draw 3 deals and keeping the best-looking position. It won deal 3 in 87 moves for the cascade and the “Well Played” panel. And it filled the Ledger by playing 120 deals. It won 26 of 60 at Draw 1 but only 3 of 60 at Draw 3, which says something about Draw 3.

Technical Details

  • Language: Lua on LÖVE 11.5
  • Rendering: a 960×540 virtual table scaled to any window. Fonts and card art are rasterized at the window’s real scale, and the cloth and cards are cached in canvases.
  • Rules: one move pipeline (canMove, moveCards, drawStock, undo) and snapshot undo
  • Hints and auto-complete: ranked legal moves, plus a check for when no useful moves are left
  • Testing: --selftest runs 2000 seeded random games, undo round-trips, and a regression test for each bug fixed
  • Libraries: LoveLibs as a git subtree (scaling, settings, sound)
  • Fonts: Old Standard TT and IM Fell English SC, both under the SIL Open Font License