49

Show HN: 3D Mahjong, Built in CSS

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)

8 minutes agothenthenthen

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.

3 hours agocodingdave

Thanks for mentioning this. I played a little bit and I felt like it was the opposite of what I'd remembered. I do like that the inaccessible tiles are faded somewhat so that I don't inadvertently try to match them.

3 hours agorpdillon
[deleted]
an hour ago

Thank you for the feedback! I will triple check the rules

3 hours agorofko

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

36 minutes agosanj

Should it be named Shanghai solitaire Or Mahjong Solitaire ?

an hour agordescartes

Maybe Mahjunk, am I right?

slowly lowers right hand in awkward silence

an hour agogchamonlive

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

23 minutes agoTazeTSchnitzel

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

2 hours agoakersten

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

an hour agoMinor49er

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

23 minutes agooverflyer

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

3 hours agoDuncanCoffee

Maybe it was done this way so that they don't have to sort the tiles by depth?

2 hours agoomoikane

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.

2 hours agohaunter

Riichi is the fun one, where skill weights over luck.

2 hours agosnvzz

I also prefer riichi. Furiten is such a game changer, all other rulesets feel a bit less after that

2 hours agohaunter

Riichi is a good candidate for a video game due to all the specific rules. It has a lot of room for QoL. I have an app on my phone [1] that has made it fun to play and learn thanks to the guidance it has with the rules

[1] https://kemono.games/game/Kemono-Mahjong hunky furries aside, it's a really good single player Riichi app lol

2 hours agowhateveracct

>hunky furries

Well the other options are the gooner gacha games like Mahjong Soul and Riichi City lol

Personally I play on Mahjong Soul because apart from Tenhou that has the most populated PvP with enough players in each rank + it's a butter smooth experience with all the small features. And I love the special modes like Battle of Asura

an hour agohaunter

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

3 hours agoHardwareLust

This ain't mahjong.

Instead, it is some solitaire using mahjong pieces.

2 hours agosnvzz

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

an hour agouser3939382

Sounds like dongbeinese (or erhua) haha, ‘marjang’

an hour agothenthenthen

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

3 hours agoapresmoi

There's some CSS properties specifically for doing 3D, yeah. You use perspective and perspective-origin to create the view frustum, and then CSS transforms to place your elements in 3D space.