Skip to content

Tiến lên miền Nam research

Question (owner, 2026-10-16): research and list the features a complete Tiến lên miền Nam would have, for review. The owner accepted the proposed answers the same day (decisions); the game’s rules are now specified in games/tien-len/SPEC.md. Online play is a platform feature: Online rooms.

Rules every table agrees on

TopicRule
Deck and players52 cards, 2–4 players, 13 cards each; with 2 or 3 players the rest stay face down
Card order3 < 4 < … < K < A < 2; suits ♠ < ♣ < ♦ < ♥ (so 3♠ is the lowest card, 2♥ the highest)
CombinationsSingle (rác), pair (đôi), triple (sám), straight (sảnh: 3+ consecutive ranks, no 2), double straight (đôi thông: 3+ consecutive pairs, no 2), four of a kind (tứ quý)
FollowingSame kind and size, with a higher top card (rank, then suit)
PassingA player who passes sits out until someone wins the round (vòng) and leads again
First handThe holder of 3♠ leads
Later handsThe winner of the last hand leads
Chopping (chặt)3 đôi thông beats a single 2; tứ quý beats a single 2, a pair of 2s and 3 đôi thông; 4 đôi thông beats a single 2, a pair of 2s, 3 đôi thông and tứ quý; each also beats a lower one of its own kind
EndPlayers go out in order: nhất, nhì, ba, bét

House rules

Sources disagree on these, and so do families. Each becomes a game option of the room, with a default the owner confirms. Proposed defaults are marked; none is decided.

#House ruleChoicesProposed default
H1The first lead must include 3♠Yes / noYes
H24 đôi thông may chop out of turn, even after passingYes / noYes
H3Chặt chồng: a chop can be chopped again, and penalties add up onto the last player choppedOn / offOn
H4Thối: 2s and bombs left in hand at the end cost pointsOn / offOn
H5Cóng: a player who has not played a single card when someone goes out pays doubleOn / offOn
H6Tới trắng (instant win on the deal)Any of: sảnh rồng (3→A), tứ quý 2, 5 đôi thông, 6 đôi, 3 sám liên tiếp; tứ quý 3 or 3 đôi thông with 3♠ in the first handSảnh rồng, tứ quý 2, 5 đôi thông, 6 đôi
H7When the hand endsPlayed to the last place / stops when the first player goes outPlayed to the last place
H8PointsPlaces only (+2 / +1 / −1 / −2, as Board Game Arena) / places plus chops, thối and cóng as pointsPlaces plus chops, thối and cóng
H9Whether 3 đôi thông can beat a pair of 2sNo / yesNo

Penalty values (a black 2 is worth less than a red 2; 3 đôi thông < tứ quý < 4 đôi thông) go in the SPEC once H3–H5 and H8 are chosen. Points are a table’s score, never money (see open questions).

Features of a complete game

Each line says where it lives: G the game (its rules module and view), P the platform (rooms, reused by later games). Phases follow Online rooms: 1 offline, 2 online, 3 polish.

Playing a hand

FeatureWherePhase
Deal animation; the hand sorted by rank, or by combinations (toggle)G1
Tap cards to select, slide a finger across cards to select a run; big Đánh and Bỏ lượt buttonsG1
Smart select: tap one card and the smallest combination with it that beats the table is suggestedG1
Gợi ý: cycles through the legal plays; cards that cannot be played are dimmedG1
A refused play says why, in words a child understands (“Phải lớn hơn đôi 7”)G1
The table shows the last play and who made it; every opponent’s card count and pass markG1
Tiered feel: a play, a winning play, a chop, a stacked chop, an instant win, thối — each bigger than the last (kit juice, sfx, haptics)G1
Results: places, chops, penalties, points; the series scoreG + P1
The room’s house rules on one screen, with card picturesG1
A first-time tutorial: a guided hand with hints (for children)G1
Light and dark themes; a four-colour deck option for small screensG1
Turn timer ring and a sound and vibration when it is your turnG + P2

Bots

FeatureWherePhase
Dễ: a random legal play, rarely passesG1
Vừa: heuristics — sheds low cards and straights first, keeps bombs and 2s for the right momentG1
Khó: heuristics plus a short Monte Carlo look-ahead within a fixed budget (evidence)G1–2
A human-like thinking delay (0.6–1.5 s)G + P1
Fill empty seats; play for a disconnected player until they returnP2
Bots never see hidden cards: they decide from their own seat’s viewG1

Rooms (the platform’s reference flow)

FeatureWherePhase
Lobby: public rooms live, Chơi nhanh, Tạo phòng, Nhập mã, Chơi với máyP2
Private rooms; 6-digit code; /r/<code> link; QR; Web Share (Zalo, Messenger)P2
Waiting room: seats, ready marks, add or remove a bot per seatP2
Host: change options, remove a player, pass the host role, lock the room, startP2
Reconnect and resume after a locked screen, a network change or a deployP2
Next hand, rematch, leaving between hands, a newcomer taking a free seatP2
Preset reactions (emoji and short phrases), no typed chatP3
SpectatorsP3
Invite a household member from the room, shown in their hubP3

Progress

FeatureWherePhase
The series score of a room (bảng điểm)P2
Hand history and replay of a finished hand, every hand revealed, from its seed and actionsP + G3
Personal statistics: hands, places, chops, instant winsP3
Household leaderboard (wins or points per week)P3
Offline: an unfinished hand against bots resumes where it stopped (save after every move)G1

Family and operations

FeatureWherePhase
Parent switch: a child may play with other householdsP2
Age filter (minAge) as for every gameP1
Telemetry: reconnects, refused actions, round-trip timeP2
Bot-only tables on the dev stack playing thousands of hands to test the serverP2
An operator view of open roomsP3

Later, on the same foundation

Tiến lên miền Bắc (suit and colour rules), counting-cards scoring (đếm lá), Sâm lốc, Phỏm, and board games such as Cờ caro and Cờ tướng online: each is a new rules module and view; the rooms stay the same.

Technology for the table

Question (owner, 2026-10-16): is the UI technology good enough, or should a better one be researched for this game?

Answer: keep Phaser 4 with the game kit for the table (ADR 0012); the lobby and waiting room are hub pages in React, like the rest of the hub. What makes a card game feel polished is the cards, the motion and the feedback, not a different engine:

NeedHow
Crisp cards on every phoneEach card face is drawn once into a texture at device pixels (the kit’s drawTexture), with vector suit shapes instead of font glyphs (iOS draws ♥ as an emoji in some fonts). 52 cards cost 52 quads a frame.
Dealing, playing, choppingPhaser tweens and timelines; the kit’s tiered juice, sfx and haptics
Light and dark, four-colour deckTextures keyed by theme and deck, redrawn on change, as the block games do
Menus and resultsThe kit’s DOM overlay
A WebGL failureThe kit’s Canvas fallback, already proven on the A55

Considered and not needed now:

  • DOM and CSS animations: good for UI-like games, but the kit’s sounds, juice, telemetry and fallback are built around a Phaser scene, and a second way of building games costs more than it gives.
  • Rive or Lottie for animated effects: a runtime in every build and files made in a designer’s tool, which agents cannot write or review.
  • A ready-made SVG deck: a CC0 four-colour deck exists (about 200 KB), and classic court figures would look more traditional. Drawn cards are smaller, follow the themes and need no licence check; a classic deck can be an option later.

Layout on a phone

iOS Safari cannot lock the orientation of a web page, and spike S3 (orientation inside the iframe) is still open. Proposed: portrait first — the player’s 13 cards fanned in one or two rows at the bottom, the three opponents top, left and right with avatar, card count and timer ring, the table in the middle — with landscape supported. Card apps are often landscape; this is an open question.

Open questions

  1. House rules: the defaults H1–H9 above?
  2. Points: places plus chops, thối and cóng (proposed), or places only? Never money or chips (proposed)?
  3. Age: minAge 6 (proposed)?
  4. Orientation: portrait first (proposed) or landscape?
  5. Phase 1 first: ship Tiến lên offline against bots before the rooms (proposed), so the family settles the house rules while the platform work is reviewed?
  6. Id and name: tien-len, “Tiến Lên” (proposed)?

Sources

Decisions on the proposal’s open questions

The owner accepted every proposed answer on 2026-10-16 (“theo đề xuất của ta hãy triển khai đi”):

  1. House rules H1–H9 default as proposed.
  2. Points: places plus chops, thối and cóng; never money or chips.
  3. minAge 6.
  4. Portrait first, landscape supported.
  5. Tiến lên offline against bots ships first, then the rooms.
  6. Id tien-len, name “Tiến Lên”.