logoalt Hacker News

Show HN: 3D Mahjong, Built in CSS

82 pointsby rofkotoday at 3:53 PM39 commentsview on HN

Comments

codingdavetoday at 3:58 PM

It is a nice UX, but with a fatal flaw: Tiles are supposed to be free when there is a side free, but you instead have it coded to be free when the top or bottom is free. Your app, your rules, so if you intended to do that, cool. It is just a fundamental divergence from how other implementations do it.

show 3 replies
Bendertoday at 8:02 PM

I think this is a good example of what CSS can do and probably was not easy to make but I will likely stick with Mahjong that comes with most Linux distributions as they follow rules that people I may end up playing against would know and they have many layouts. I could see this being applied to other things however such as games that require building or repairing something. Or something similar to Minecraft?

Impressive work!

show 2 replies
rdescartestoday at 5:58 PM

Should it be named Shanghai solitaire Or Mahjong Solitaire ?

show 1 reply
sanjtoday at 6:38 PM

This is lovely! Can I suggest make sure that the board is solveable?

aranwtoday at 8:51 PM

Really enjoyed that although my final two tiles were stacked and couldn't finish the game!

akerstentoday at 4:59 PM

If I click fast enough on mobile it starts trying to select/highlight text, should be able to prevent that with CSS too. I find this is somehow a common issue that separates a lot of PWAs from real apps, the browser text engine is still lurking there in the background trying to recall us all to the glory days of hypermedia

show 1 reply
thenthenthentoday at 7:06 PM

There are some super weird bugs, sometimes only one of the two pieces are removed and sometimes the field goes blank? Also on every move the faves change?! iOS here. And yeah, no majiang, but still super cool! Nostalgic vibes waiting for my fries and playing the Photo Play touch screen gambling machine (after unlocking it by tapping the words photo and play on the logo with two different fingers and entering the code)

tejonutellatoday at 9:25 PM

Looks cool! Wish I knew how to play Mahjong tho

hauntertoday at 5:20 PM

Now make it _real_ mahjong (; https://en.wikipedia.org/wiki/Mahjong

Which makes me wonder which ruleset would be the easiest to implement. Probably MCR or HK, riichi has too many edge cases and sepcial rules and yakus.

show 1 reply
Minor49ertoday at 6:12 PM

This is pretty cool. I like the look and the gameplay. Though playing on mobile, some of the roatation gestures caused the page to refesh on me a couple of times since they triggered the browser's "drag down to refresh" interaction

koolalatoday at 8:10 PM

I wish you could rotate all the way. On a phone its also easy to do the refresh gesture.

DuncanCoffeetoday at 4:41 PM

Nice! Wish the supported rotation was bigger, maybe +- 90 instead of only 90 deg?

show 1 reply
TazeTSchnitzeltoday at 6:51 PM

Is the lack of a perspective projection option deliberate? CSS can do that too.

HardwareLusttoday at 4:18 PM

Very nice! Worked great on my shitty old Motorola phone.

jsmotoday at 8:20 PM

Nice!

snvzztoday at 5:27 PM

This ain't mahjong.

Instead, it is some solitaire using mahjong pieces.

show 1 reply
user3939382today at 6:02 PM

Some people say “mar” jong it’s the weirdest thing.

show 1 reply
apresmoitoday at 4:27 PM

wtf kind of magic is that? I looked at the repo and... you've built a 3d CSS rendering engine to create this?

show 1 reply
overflyertoday at 6:51 PM

This has bothing to do with how Mahjong is actually played.

show 1 reply