Contents

Key takeaways

  • Unity card game for iPhone and Android, 2 to 4 players: bots, online, with friends using a code.
  • Online with no game server: the host validates each move, numbers it and sends it to everyone with a game fingerprint.
  • A bot that does not cheat: it only sees what a player would see, on three tunable levels.
  • Rules, economy and translations tunable remotely, with a check that rejects any inconsistent patch.
  • 11 languages, animated execution scenes and a lighter app thanks to compressed and on-demand images.

8 Américain: Duel is a card game for iPhone and Android, built with Unity. It brings the classic French card game « 8 américain » (close to Crazy Eights) to 2 to 4 players: against bots, online with other players at the same table, or with friends using a code. I designed and built it end to end, from the rules to online play. It has not been released on the stores yet.

What it is, and who it is for

« 8 américain » is played everywhere in France, and everyone has their own variants. The game is for people who want a quick game against bots, and for those who want to play with their friends from afar.

The basic rules: 8 cards each, a 54-card deck with two jokers, and you play a card of the same suit or the same rank.

  • The 8 changes the suit, and you cannot finish on an 8.
  • The Ace makes the next player draw two cards, the Joker four. An Ace answers an Ace and the draws add up.
  • The 7 skips the next player, the 10 gives you another turn.
  • « Carte ! » (« Card! »): with a single card left, you must call it. An opponent who presses the button before you makes you draw. Calling it for nothing also costs you a card.

The player journey

  1. First launch: a real guided game against a bot, with cards dealt in advance to show each rule. It can be skipped.
  2. Profile: nickname, age and choice of a character.
  3. Home: against 1 to 3 bots, online, with friends, plus the shop, the collection, a gift every four hours, the daily challenge and the statistics.
  4. The game: you slide your finger over your hand, the card under your finger grows, and you flick it up or tap it to play it.
  5. The end: an animated execution scene against the loser's cards, the winnings screen, the « Chambre-le ! » (rub it in) bar and the rematch.
8 Américain: Duel home screen with the bot, online and friends modesFour-player game as a 10 gives the player another turnJoker +4 played on the discard pile while the opponents' cards laugh
The home screen, a four-player table on a « Rejoue ! » (play again), then a Joker +4 that makes the whole table laugh.

Features

Game modes

  • Against 1 to 3 bots, on three levels: Beginner, Medium and Expert.
  • Online with 2 to 4 players, on four stake tables, from Beginner to Legend, with a minimum level per table. You only meet players from your own table.
  • With friends: a private room with a code, 2 to 4 players, no stake. The host starts the game.
  • One-tap rematch, which starts when everyone is ready.

Collection and customisation

  • 11 executions sorted by rarity (Basic, Rare, Epic, Legendary), bought with in-game coins.
  • 8 characters: yours becomes the victim when you lose, and the winner of some scenes when you win.
  • 13 vector-drawn card backs and 7 table mats.

Atmosphere and reasons to come back

  • Emotes and phrases to send during the game, seen by every player online.
  • A gift every four hours, a daily challenge, levels and detailed statistics.
  • A « Share my win » button: a screenshot of the end screen goes to the phone's share menu.

Technical challenges and how I solved them

Four-player online play without a game server

An online card game usually relies on a server that runs the games. I chose to do without one: no machine to rent, monitor and update. The game relies on Unity's services (Unity Gaming Services): anonymous sign-in, sessions of up to four seats, and a network relay that carries messages between phones.

The phone that opens the game becomes the host. It is connected to each guest, in a star layout, and it is the reference:

  1. At the start, the host sends everyone a random seed, the first player, the seating order and the rules in force.
  2. Each phone builds the same game from that seed: the deck is shuffled the same way everywhere.
  3. When a guest plays, the card does not leave right away: the guest asks the host for the move.
  4. The host checks the move, plays it, then sends it to everyone with a number. If it is no longer possible, the host refuses it.
  5. Each guest replays the move locally, then checks the result.

Nobody can play a card they do not have, and two simultaneous « Carte ! » calls do not create two games: the host's order is final.

Making sure every phone sees the same game

After each move, the host attaches a fingerprint of the game state: each player's hand, the number of cards left in the draw pile, the top card, whose turn it is, pending draws, the requested suit, the direction and the ranking. Each guest computes its own after replaying the move. If they differ, the game stops cleanly, stakes are returned and the incident is reported to analytics.

The rules engine is written in pure C#, with no dependency on Unity, so it can be tested outside the game. Automated tests check that the same seed and moves produce the same game everywhere, including when a player leaves a three- or four-player game.

Finding players and handling departures

Quick play looks for an open session at the same table, or opens one. Several tricky cases are handled:

  • Waiting room: 30 seconds. With four players, the game starts right away, otherwise at the end of the countdown with two or three. Alone, the bot is offered after a minute and a half.
  • Two rooms opened at the same instant: a host left alone looks for an older session at the same table and joins it. The tie-break uses the service's clock, so both phones decide the same way.
  • Player gone silent: a 30-second wait, shown at the table. Then the game tests its own internet connection. If it responds, the other player is the one who left: with two players, it is a win; with three or four, the host plays a « leave » move for them that everyone replays. Otherwise, I am the one who lost the network.
  • Host leaving: the game is interrupted and stakes are returned.
  • Turn timer: a bar empties under the player. When it runs out, the move is played automatically.
Private room for friends with the game code to shareStatistics screen: wins, streaks, cards played and executions
The friends room with its game code, and the statistics screen.

A bot that plays like a human

The bot does not cheat: it only sees what a player would see, namely its hand, the discard pile and the number of cards the others hold. It also remembers the suits an opponent lacked when they had to draw, and prefers to play those suits. It keeps its Joker and an 8 for the endgame, and counters with an Ace rather than a Joker. With more players, it mainly targets the next player, the one its Aces, Jokers and 7s hit.

The three levels are tuned with a few values: share of calculated moves, chance of remembering « Carte ! » or spotting a missed call, thinking time. An automated test plays 1,000 bot-versus-bot games, with several rule variants, and checks that no card is ever lost. Another checks that the Expert clearly beats the Beginner.

Rules and economy tunable remotely

Everyone has their own version of « 8 américain ». So every rule is a setting: number of cards, Ace and Joker draws, counters, Joker answering an Ace, effects of the 7, the 10 and the Jack, finishing on an 8, « Carte ! » penalties, draw then pass. The same goes for the bot levels, the winnings, the table stakes, the collection prices and the animation speed.

A patch sent through Unity Remote Config is merged into the settings file shipped with the game, then checked before being applied on the next launch. An inconsistent patch is ignored entirely, and the game keeps its original settings. Online, the host's rules travel with the seed: every player in a game uses the same ones, even if one of them has not yet received the latest patch.

11 languages

The game is translated into French, English, Spanish, Brazilian Portuguese, German, Italian, Turkish, Indonesian, Russian, Japanese and Korean. The French text written in the code is the key, and each language has its own file. A script checks that each language has all its texts. For Japanese and Korean, fonts reduced to the characters actually used are embedded. A test plan walks through every screen in a given language and flags texts that overflow.

Rich scenes without bloating the app

Executions are short scenes of about eight seconds, with a painted setting, wide shots, close-ups and slow motion. With three or four players, the winner's execution hits all the losers at once, each with their own character. Online, each phone announces its execution and character at the start, and the host relays them, so everyone sees the same scene.

To keep the app light, the scene images are compressed in ASTC, which brought the installed size down from about 227 to 105 MB. Only the default character is bundled: the others are downloaded when you pick them or when an opponent uses them, and replaced by the living card if they are missing.

Victory screen with the winnings, the double button and the taunt barLegendary execution: the winner abducts the loser in a flying saucerCollection of executions sorted by rarity, with the Try button
The victory screen with the winnings and the « Chambre-le ! » (rub it in) bar, a Legendary execution, and the Collection sorted by rarity.

Tech stack

  • Engine: Unity 6.5 and C#, UI built with UI Toolkit, cards and suit symbols drawn as vectors.
  • Rules and bot: a C# library with no Unity dependency, covered by automated tests.
  • Online: Unity Gaming Services (anonymous sign-in, sessions, Relay) and Unity Transport, with reliable, ordered messages.
  • Remote settings: Unity Remote Config, for the game and for translations.
  • Account: Game Center on iPhone, linked to the Unity identity.
  • Monetisation and analytics: Google AdMob with consent form, RevenueCat, Google Analytics for Firebase, Meta SDK.

A game or an app to build?

This project shows what I can deliver on mobile: a complete product, from the rules engine to online play. To see the game, visit the 8 Américain: Duel page. To discuss your game or app project, feel free to get in touch.

Frequently asked questions

How does online play work without a game server?

Phones go through Unity's services (anonymous sign-in, sessions and network relay). The phone that opens the game acts as host: it validates each move and sends it, numbered, to everyone, and each guest replays the move then compares the game fingerprint.

Can the rules change without updating the app?

Yes. All rules, bot levels and the economy are settings that can be patched remotely with Unity Remote Config. The patch is checked before being applied on the next launch, and ignored entirely if it is inconsistent.

Is the game available on the App Store and Google Play?

Not yet. The game is being tested on iPhone and Android, not yet on the stores.