Live data from Hacker News

Show HN: 3D Mahjong, Built in CSS

voxjong.com

51–60 of 62 posts

Re: Show HN: 3D Mahjong, Built in CSS

#52
post #28

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? Impress…

Minecraft in CSS has been done, actually! https://benjaminaster.com/css-minecraft/ Discussion: https://news.ycombinator.com/item?id=44100148

When Doom in pure CSS ?

Re: Show HN: 3D Mahjong, Built in CSS

#53
post #43

Earlier quoted context omitted.

If you rotate it so the board looks like the traditional solitaire layout, the direction of free tiles is horizontal as it's supposed to be. But then the images on the tiles are rotated 90 degrees. Either way you look at it, something is non-standard. The other thing is that this implementation doesn't seem to support overlapping tiles, which is kind of important. For instance, the topmost tile should overlap and blo…

Thank you for the insight! I think rotating the tile images is key. Since I’m using CSS Grid for positioning, there are some limitations around overlap like the one you mentioned, but it should be solvable. I’ll keep working on it to bring it closer to the standard behavior.

Two games in a row now I have gotten to a point where the last two pieces are ontop of eachother. I think this is perfectly fine, but seems to happen a little too often. Or I was just very unlucky.

Otherwise it's a sweet game!

Re: Show HN: 3D Mahjong, Built in CSS

#54

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

Thanks for the feedback! Just pushed that fix.

Re: Show HN: 3D Mahjong, Built in CSS

#55

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

Thanks for the report! I added a patch that hopefully fixes that.

Re: Show HN: 3D Mahjong, Built in CSS

#57
post #53
post #43

Earlier quoted context omitted.

Thank you for the insight! I think rotating the tile images is key. Since I’m using CSS Grid for positioning, there are some limitations around overlap like the one you mentioned, but it should be solvable. I’ll keep working on it to bring it closer to the standard behavior.

Two games in a row now I have gotten to a point where the last two pieces are ontop of eachother. I think this is perfectly fine, but seems to happen a little too often. Or I was just very unlucky. Otherwise it's a sweet game!

Thank you! I'm going to review that. In the meantime I've added Undo/Redo options so you can backtrack your steps.

Re: Show HN: 3D Mahjong, Built in CSS

#58
post #13
post #11

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.

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

Riichi is the most fun one, in my opinion, but I would not go so far as to say "skill weights over luck". The absolute best Riichi players win less than 25% of hands.
Post reply on HN