hacker-news-custom-logo

Hackr News App

58 comments

  • lieblingautor

     

    8 minutes ago

    next

    [ - ]

    i'm confused how to play it but it's pretty amazing this was done with css cool stuff man

    reply
  • codingdave

     

    1 day ago

    prev

    next

    [ - ]

    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.

    reply

    jasperry

     

    23 hours ago

    parent

    next

    [ - ]

    [ x ]

    <@codingdave> 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 block all four tiles under it.

    reply

    rofko

     

    23 hours ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@jasperry> 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.

    reply

    omgmajk

     

    12 hours ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@rofko> 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!

    reply

    rofko

     

    11 hours ago

    root

    parent

    next

    [ - ]

    [ x ]

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

    reply

    rpdillon

     

    1 day ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@codingdave> 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.

    reply

    rofko

     

    1 day ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@codingdave> Thank you for the feedback! I will triple check the rules

    reply

    thih9

     

    1 day ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@codingdave> > Tiles are supposed to be free when there is a side free

    No.

    According to wikipedia[1]: "A tile is said to be open or exposed if it can be moved either left or right without disturbing other tiles.". Also look at the photo in the wikipedia article[2]. This implementation looks correct to me.

    [1]: https://en.wikipedia.org/wiki/Mahjong_solitaire

    [2]: https://en.wikipedia.org/wiki/Mahjong_solitaire#/media/File:...

    reply

    Crestwave

     

    21 hours ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@thih9> A "free side" means being exposed on the left or right, matching your Wikipedia quote. On the other hand, OP's implementation checks if it can be moved up or down.

    reply
  • rdescartes

     

    1 day ago

    prev

    next

    [ - ]

    Should it be named Shanghai solitaire Or Mahjong Solitaire ?

    reply

    gchamonlive

     

    1 day ago

    parent

    next

    [ - ]

    [ x ]

    <@rdescartes> Maybe Mahjunk, am I right?

    slowly lowers right hand in awkward silence

    reply
  • alexpotato

     

    22 hours ago

    prev

    next

    [ - ]

    Coding + Mahjong related story:

    Back in college, while majoring in CS, I had a rough time dealing with semicolons, typos, missed characters while coding.

    I thought to myself "I wonder if playing Mahjong in the Windows games would help me get better at scanning code and finding these types of errors". So I tried it and, lo and behold, it did.

    Also, in this day and age of LLMs writing a lot of the code, scanning for missing semicolons in code sounds like "I was great at fixing telegraphs!"

    reply
  • sanj

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    uean

     

    19 hours ago

    parent

    next

    [ - ]

    [ x ]

    <@sanj> This is part of the game. Many games will not be solvable.

    reply
  • Bender

     

    1 day ago

    prev

    next

    [ - ]

    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!

    reply

    koolala

     

    1 day ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@Bender> I wonder if versus Mahjong Solitaire could be like Battle Tetris. I've never heard of people playing it competitively.

    reply
  • haunter

     

    1 day ago

    prev

    next

    [ - ]

    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.

    reply

    snvzz

     

    1 day ago

    parent

    next

    [ - ]

    [ x ]

    <@haunter> Riichi is the fun one, where skill weights over luck.

    reply

    haunter

     

    1 day ago

    root

    parent

    next

    [ - ]

    [ x ]

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

    reply

    whateveracct

     

    1 day ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@haunter> 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

    reply

    haunter

     

    1 day ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@whateveracct> >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

    reply

    dugidugout

     

    17 hours ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@haunter> I second Mahjong Soul!

    reply

    koolala

     

    1 day ago

    root

    parent

    prev

    next

    [ - ]

    [ x ]

    <@haunter> I've been looking for a free one with really good helper UI to keep track of all the rules.

    reply

    haunter

     

    1 day ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@koolala> Helper UI per se won't exist because there are so many little things.

    If we talk about riichi then the best tutorial is probably in Kemono Mahjong https://cyberdog.ca/kemono-mahjong/

    Personally I'd say Mahjong Soul is the best riichi client out there, that's where I play https://mahjongsoul.yo-star.com/ Extremely streamlined, good QoL features like tile highlighting (dora too), showing waits and options when you are tenpai, custom lobbies (so you can play with friends), and a pretty robust online ranked system. There is a good tutorial too. The big downside is the gacha system which is purely cosmetic and doesn't affect gameplay at all but it can be a turn off for some people.

    reply

    alexb_

     

    8 hours ago

    root

    parent

    prev

    next

    [ - ]

    [ x ]

    <@snvzz> 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.

    reply
  • akersten

     

    1 day ago

    prev

    next

    [ - ]

    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

    reply

    rofko

     

    11 hours ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@akersten> Thanks for the feedback! Just pushed that fix.

    reply
  • thenthenthen

     

    1 day ago

    prev

    next

    [ - ]

    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)

    reply
  • aranw

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    rofko

     

    23 hours ago

    parent

    next

    [ - ]

    [ x ]

    <@aranw> That's unfortunate! I'll make sure to patch that case.

    reply
  • Minor49er

     

    1 day ago

    prev

    next

    [ - ]

    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

    reply

    rofko

     

    11 hours ago

    parent

    next

    [ - ]

    [ x ]

    <@Minor49er> Thanks for the report! I added a patch that hopefully fixes that.

    reply
  • DuncanCoffee

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    omoikane

     

    1 day ago

    parent

    next

    [ - ]

    [ x ]

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

    reply

    koolala

     

    1 day ago

    root

    parent

    next

    [ - ]

    [ x ]

    <@omoikane> Would it just be the opposite depth of the current sorting once you pass 180 degrees?

    reply
  • HardwareLust

     

    1 day ago

    prev

    next

    [ - ]

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

    reply
  • koolala

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    rofko

     

    11 hours ago

    parent

    next

    [ - ]

    [ x ]

    <@koolala> Done!

    reply
  • soni96pl

     

    16 hours ago

    prev

    next

    [ - ]

    Beautiful work, thank you for showing it

    reply
  • TazeTSchnitzel

     

    1 day ago

    prev

    next

    [ - ]

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

    reply
  • tejonutella

     

    1 day ago

    prev

    next

    [ - ]

    Looks cool! Wish I knew how to play Mahjong tho

    reply
  • snvzz

     

    1 day ago

    prev

    next

    [ - ]

    This ain't mahjong.

    Instead, it is some solitaire using mahjong pieces.

    reply

    koolala

     

    1 day ago

    parent

    prev

    next

    [ - ]

    [ x ]

    <@snvzz> Is mahjong using solitare pieces Rummy?

    reply
  • jsmo

     

    1 day ago

    prev

    next

    [ - ]

    Nice!

    reply
  • alexb_

     

    8 hours ago

    prev

    next

    [ - ]

    Disappointed to see that this is solitaire and not Riichi :( would love to see more implementations of actual mahjong

    reply
  • user3939382

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    thenthenthen

     

    1 day ago

    parent

    next

    [ - ]

    [ x ]

    <@user3939382> Sounds like dongbeinese (or erhua) haha, ‘marjang’

    reply
  • apresmoi

     

    1 day ago

    prev

    next

    [ - ]

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

    reply

    pverheggen

     

    1 day ago

    parent

    next

    [ - ]

    [ x ]

    <@apresmoi> 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.

    reply
  • overflyer

     

    1 day ago

    prev

    [ - ]

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

    reply

    koolala

     

    1 day ago

    parent

    [ - ]

    [ x ]

    <@overflyer> Isn't normal Mahjong 2D? 3D is a different game.

    reply

    pfych

     

    23 hours ago

    root

    parent

    [ - ]

    [ x ]

    <@koolala> This is Mahjong Solitaire - It's completely different to actual Mahjong. It's a completely different game that uses Mahjong tiles.

    reply