logo

Babylon.js Market

By Lawrence

5 minutes

The opponents can think for themselves now. Your stack and the pot are already on screen too. The HUD you built with the betting engine has drawn poker.chips since Lesson 2. But you still can't watch the opponents think. PokerBetting finishes a whole betting round in one tick. Randy, Bill, and Cali all act at the same moment, in one burst. So the turn glow would flash by in an instant. Your prompt would show up before you noticed anyone move. The hand plays out correctly. It just goes by too fast to watch. The fix is one more display-only component called TurnPacer. It slows the burst down so the HUD can light up one step at a time.

A row of sleek glowing glass status pills, one per player seat, floating along the edge of an emerald felt poker table, each showing a stack and bet, the active seat pulsing brighter, a faint metronome and clock motif behind them suggesting paced timing, warm gold and cream UI accents on near-black, clean cinematic HUD-over-felt look.

Add TurnPacer to the Presentation entity

The Presentation entity already exists from Lesson 2. It carries PokerHUD. Add TurnPacer next to it:

"Presentation": {
  "components": {
    "PokerHUD": {},
    "TurnPacer": {}
  }
}

TurnPacer needs no config here. It uses its default pace, and it has no dependencies. Like the HUD, it only listens to the bus. It takes the fast turn burst and spaces it out into slower events. The HUD already knows how to draw those events. The sim never knows TurnPacer is there.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search