Live data from Hacker News

Show HN: I made a Mahjong browser game

jongmah.com

81–88 of 88 posts

Re: Show HN: I made a Mahjong browser game

#81
post #66

Possibly a stupid question: is it possible not to win this? Is it just for the purposes of relaxing, or is there a strategy? I played one hand, and it needed to shuffle towards the end because there were no legal moves, and then I won. Can every hand be won without a shuffle?

Just like many solitaire games, you can definitely lose in Mahjong Solitaire. Since there are four tiles (two pairs) of each tile set, you can play in such a way that you’re deadlocked because of a previous choice. Imagine, for example, there are two matching tiles with one stacked on top of the other. If you already removed the other two matches for that same tile set, then you’re stuck, since the only way to remove…

I guess my question was whether "shuffle" was a legitimate part of the game, or if it means "you've lost, try again."

When the tiles are shuffled, the situation you describe gets undone, no? So I'm guessing that means you've basically lost, but in this implementation it doesn't make that clear (at least to me), so I just carried on and figured I won.

Re: Show HN: I made a Mahjong browser game

#82
post #81

Earlier quoted context omitted.

Just like many solitaire games, you can definitely lose in Mahjong Solitaire. Since there are four tiles (two pairs) of each tile set, you can play in such a way that you’re deadlocked because of a previous choice. Imagine, for example, there are two matching tiles with one stacked on top of the other. If you already removed the other two matches for that same tile set, then you’re stuck, since the only way to remove…

I guess my question was whether "shuffle" was a legitimate part of the game, or if it means "you've lost, try again." When the tiles are shuffled, the situation you describe gets undone, no? So I'm guessing that means you've basically lost, but in this implementation it doesn't make that clear (at least to me), so I just carried on and figured I won.

Yeah, I nothing that’s just a way to allow you to finish when you get stuck. In most games I’ve played (and I’ve played many different ones on iPhone, computer, and consoles), I don’t think I’ve seen that. Usually once you’re stuck, they’ll let you know and you have to start a new game.

I have, however, often seen them allow you to replay the same setup to try and beat it again. Many also allow undo (sometimes limited, sometimes unlimited) to reverse your moves to get out of being stuck.

Re: Show HN: I made a Mahjong browser game

#83
post #64

Earlier quoted context omitted.

macOS does indeed show the scrollbar at all times when a input device other than a touchpad is attached. My desktop Mac never hides the scrollbar, as it uses a normal mouse, however when I was using a Magic Trackpad the scrollbar would indeed hide unless I was actively scrolling. Odd behavior.

There's actually a system preference that shows/hides the scrollbar. System Preferences > General > Show scroll bars • Automatically based on mouse or trackpad • When scrolling • Always (because I remember when smart phones didn't exist) I keep mine at option 3 because I'm a dinosaur

Good info, had no clue that was a configurable option. Thanks for the knowledge!

Re: Show HN: I made a Mahjong browser game

#85
post #40

Good job technically overall. Some player feedback: It seems to be using more than a standard mahjong set? I saw 3 pairs of eight dots in a game. Other confusing part are the one bamboo tiles where they’re all different art — took awhile to figure out they ‘matched’ Fun times!

After playing a bit, this is definitely not using a consistent set.

Additionally, if you shuffle, it doesn't give you the same tiles as you had before, which is a little disconcerting (and isn't really a shuffle, as it doesn't retain the information about which tiles you had more than one pair of remaining).

Lastly, having CTRL-Z work to undo would be helpful.

Re: Show HN: I made a Mahjong browser game

#86
post #74

Earlier quoted context omitted.

The most distinctive feature of the popular Japanese mahjong variants (as opposed to other mahjong gambling games) is probably the own-discard furiten rule: players can't win off others' discards if any tile they previous discard during that hand would complete their hand. (This is distinct from and in addition to more common "sacred discard" restriction against winning off a discard after letting another winning til…

I would add that one other important distinction, though I don't know how unique, is that you can't win off a hand which doesn't have any yaku. This partly explains the popularity of riichi, as it's okay to have riichi only.

If you have a good wait, and you have a closed hand, there’s very little incentive not to riichi.

Re: Show HN: I made a Mahjong browser game

#87
Looks nice. (On my secondary phone which runs a somewhat older Firefox it gets an "unexpected" error whenever trying to build the Butterfly, works fine all the way through the Turtle.)

Have you considered open sourcing that? I tend to avoid closed source software as much as I can. Of course Javascript is not really closed source, but I have better things to do than looking at packed source.

Post reply on HN