Whether your PCs find a place to sit in the crowded tavern of the bustling city-port of your fantasy world, drink martinis and cocktails in seedy bars of cyberpunk metropolii, or compete in the underground speakeasy of your steampunk frontiertown, you will need to come up with some sort of game your players can get interested in - a bar game.
I've seen variations of bar games, here and there. I've seen it done on Critical Role, in my own games, in some sci-fi actualplays I can't care to remember the name of.
So, what the hell works?
This determines how you want your players to interact with the world. When playing one of these games, you do not want them to have so much fun as to abandon the main point of the TTRPG altogether - an addictive minigame. You don't want it to be too complicated, and you don't want it to break the suspension of disbelief, and bring the players rushing back to playing a game for stakes in the real world.
So you want it to be interesting, but not too fun, simple, and (preferably) using in-universe theatre of the mind.
How to recognize a good (TTRPG) game
Simplicity, Playability, Interactivity, Reward. Let's say these are the pillars of a good TTRPG game.Simplicity: This one is simple - this is a game within a game, you don't want to not play the game you're all here to play. Then you might as well tear one off the shelf and begin playing with those coloured tokens. You want it to be accessible, simply.
Playability: In the end, no matter how simple the game is, you want the game to play well. The no stakes "one roll and you're out" is no fun. Neither is the simple game with the same outcome. This ties into the simplicity and accessibility in your game.
Interactivity: I would like to say this one is the most vital of the bunch. You are here to play a TTRPG. Whether it be online or in mom's basement or at your local gamng store, you are here to play with other people. In this regard, you want the game to stimulate interaction between your characters, and your NPCs - this includes making it crystal clear that your NPCs are cheating, but the characters not knowing that. This can take the form of betting, constant chatter, still pokerfaces; the point is that the very act of trying to figure out the motivations of the others at the table is a vital aspect of this game.
Reward: This can honestly be anything, and is dependent on your table. Your group may just love rolling dice - let them roll dice. They might love upping stakes - give them a betting game. They might not even care about the game, but want the incredbile amounts of cash available winning it - be careful with this one, it could derail your game. Use the latter as an introduction into other parts of your world.
Example
Let's have a look at an unbelievably simple '21' variant one of my players cooked up. The point of the game is to guess the dealers roll.- Each side rolls a 1d20+1d4.
- Place bets 1 round.
- Choose to add a 1d4.
- Place bets again.
- Repeat steps 3-4 until somebody folds or cannot bet higher.
- Reveal. Closest to, below 21 wins.
We ran this as if they were playing a card game - in a bar in a MagicPunk frontiertown. Simple? Hell yeah, I wrote the rules in six short sentences. Playable? Very much so. Not dull, uses weird dice, tense, not too many moving parts. Interactive? If you don't think being smart and guessing the other's roll, reading them and then betting is being interactive, then leave. Reward? The reward can be in the money, in the tense dice rolling, or the players jeering people on.
The Advanced Dungeons & Dragons First Edition Dungeon Master's Guide had a list of gambling games on page 215-216. They are clearly in the "normal people gambling games" category.