Truco Showdown, an HTML5 Brazilian truco card game
A single-player Brazilian truco card game for the web, set in a cheerful neighbourhood bar. Play 2 vs 2 with your partner Dona Nena or 1 vs 1 against the computer, call TRUCO! to make a hand worth more and be the first team to 12 points. Plain HTML, CSS and JavaScript ES modules, with no framework and no runtime dependencies.
The table and the rules: Paulista and Mineiro
A 40-card deck (no 8, 9 or 10), 3 cards each, best of 3 tricks, and the first team to 12 points wins. Without trumps the order is 3 2 A K J Q 7 6 5 4.
Paulista: the turned card (the vira) picks the trumps, the next rank up, with clubs > hearts > spades > diamonds; a hand is worth 1 and the calls go 3, 6, 9 and 12. Mineiro: fixed trumps, the 4 of clubs > 7 of hearts > ace of spades > 7 of diamonds, no vira; a hand is worth 2 and the calls go 4, 6, 10 and 12.
Truco calls and house rules
On your turn you can call TRUCO. The other team accepts, folds (you score the value the hand had before the call) or raises, and the characters shout their calls.
Three house rules are on by default, and each one can be switched off in Quick Match: Cover (play a card face down in the 2nd and 3rd tricks; it never wins), Hand of eleven (in Paulista a team at 11 sees both hands of the team and chooses to play for 3 or fold; in Mineiro it starts at 10) and Iron hand (both teams one hand from winning: everybody plays blind). In 2 vs 2 the Signal asks Dona Nena for a sign about her cards: "Got a trump!", "I'm strong" or "I'm weak".

The circuit: 5 tables, 50 matches, 150 stars
The circuit has 5 tables with 10 matches each, shown in a 5 x 2 grid and unlocked in order: Corner Boteco (Zeca and Tico, Easy), Night Bar (Bira and Lola, Easy), Beach Kiosk (Kadu and Tia Cida, Normal), Street Fair (Seu Juca and Vó Zuleica, Normal) and Rooftop (Doutor and Madame Zap, Hard). Each table has its own background and its own circuit background.
Every match gives up to 3 stars: a win, a win without folding, and a win after being 4 or more points behind, 150 stars in all. Winning match 10 opens the next table, and winning the last table opens a Champions screen with Dona Nena, a trophy, your stars out of 150 and confetti.

Characters and voices
11 cartoon characters in a Brazilian neighbourhood bar style: Dona Nena (your partner), Zeca, Tico, Bira, Lola, Kadu, Tia Cida, Seu Juca, Vó Zuleica, Doutor and Madame Zap, each with 4 faces (idle, cocky, nervous and cheering). Every rival has its own bluff and boldness, and a bluffer can fake confidence.
231 recorded voice lines (MP3), 121 in Portuguese and 110 in English: the calls (TRUCO, six, nine, ten, twelve), accept, fold, a short line for winning or losing a hand, a tease and victory. The Portuguese interface plays the Portuguese voices and every other language the English ones; the call "TRUCO!" is always the Portuguese word. Voices can be switched off.

Quick Match and 3 levels
Quick Match lets you choose the style (Paulista or Mineiro), the players (2 vs 2 or 1 vs 1), the level and the house rules, at the Corner Boteco. The computer plays at 3 levels: Easy, Normal and Hard. Hard imagines 48 possible deals of the unseen cards and plays each to the end before choosing.
Fair play: each computer player only receives what its own seat can see, and the shuffle is seeded. See the cards, at the end of a hand, shows what everybody held.
Presentation and options
All pictures are raster art made for this game (WebP): characters with 4 faces, 6 face cards, backgrounds for the title, the menu and the 5 places in portrait and landscape, table snacks, interface pieces, a trophy and end-of-match art. Effects use a canvas layer and the Web Animations API, with 12 sound effects and 2 instrumental background tracks. How to Play has 6 illustrated pages plus a Mineiro note.
Layouts for phones in portrait and landscape, tablets, desktop and ultrawide screens, with touch and mouse. Options: music and effects volume, vibration (where the device supports it), less motion, partner signals, fast game, full screen (where the browser supports it), voices and language. 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Simplified Chinese.
Reskin it: what is in which file
The game reads its data when it starts, so most changes need no build step:
- src/config.js: FEEL (every timing and effect number), AUDIO (the mix levels) and STORAGE_PREFIX (the save prefix)
- src/ui/cast.js: PEOPLE (names, bluff and boldness), TABLES (the rivals and the level of each of the 5 tables) and MATCHES_PER_TABLE
- src/game/rules.js: DEFAULT_HOUSE (house-rule defaults) and SCALES (the Paulista and Mineiro call values); the rules in src/game/cards.js and match.js
- src/ui/screens.js: starsFor, the 3-star rule
- src/lib/locales/: one text file for each of the 14 languages
- assets/: the pictures, the voices (assets/audio/voz/), the music (assets/music/) and the sound effects (assets/sfx/), found by file name

What is in the package
- game/: the game, ready to host. Upload it to any static host; no server language, database or account.
- source/: the same editable files, with optional npm run dev (local preview) and npm run build scripts that need Node.js 26.13 or newer. npm test runs 56 automated checks of the rules (source/tests/).
- An illustrated buyer guide in 14 languages and a step-by-step customization guide.
- All the art, the 231 voice lines, the 2 music tracks and the 12 sound effects, and the Fredoka font (SIL OFL 1.1).
Notes
- For one person against the computer. This edition has no mode for two people, no accounts, leaderboard, shop, purchases, betting or coins.
- The voices are in Portuguese for the Portuguese interface and in English for every other language; the call "TRUCO!" is always the Portuguese word.
- Progress and settings are saved in the browser of each player (localStorage, prefix trucoshowdown:). The game makes no requests to other servers.
- It needs HTTP(S) hosting and does not run from file://.
- It has not yet been formally tested on physical phones or tablets.






























