Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://FreeSolitaire.win is a successful PWA of mine.

It’s a Klondike Solitaire game. It used to bring ~$500/mo of advertising revenue, but that’s significantly down these days: I refuse to have a cookie/consent banner, so I refuse customized ads (in the UE, in some US states now, &c.)

Players do add it to homescreen. There is a non-intrusive button prompting them to do so, at the end of a game. People like to be able to play offline. Apart from that, I don’t use much PWA/browser features; no notifications, etc.

More info here: https://news.ycombinator.com/item?id=34483398 Happy to answer any question you may have! Happy to get some feedback too ;-)



I just discovered something interesting while playing your game: I’ve been playing solitaire incorrectly for my entire life, several decades! I thought maybe you had changed the rules but then I just looked up the rules and I see it’s I who have apparently been playing it incorrectly. When I was taught solitaire by my grandparents, instead of turning over one card when you are out of moves, you always turn over three cards. The only way to unlock those cards you passed over in dealing three instead of one is to play one of them which will change the sequence of every three cards the next time you move through that deck. This certainly makes the game harder to win.


Oh, you can play in “draw 3 by 3” mode too: https://FreeSolitaire.win/turn-three ;-)

(You can also choose the mode in the New Game dialog.)

And yes, it’s indeed harder. The solving algorithm has a winning rate of 52% in “turn one” mode, but only 18% in “turn three”.


That's how I learned it too.


Hey great app! I really like the “undo until unstuck” feature, I haven’t seen that before. Is there an algorithm for that or did you come up with something yourself?


Thanks!

The algorithm is described here: https://FreeSolitaire.win/strategy I came up with it by myself.

“The strategy presented here is the basis of the computer algorithm of FreeSolitaire.win, which is used to select finishable deals, offer hints, and detect dead-ends. You also see it surface when you are told that The computer could do it in N moves at the end of a game.

This strategy/algorithm is quite simple. It does not require to “count cards”, i.e. keep track of which cards were seen in the stock. It doesn’t require to make guesses on where such or such face-down card must be located. And the procedure is the same all along the game; there is no special treatement of the opening or ending. It’s stateless, a programmer would say. […]”


>I came up with it by myself.

That is truly great, @palsecam. I love HN because of this!


I don’t know much about these kinds of apps, but when I visit your game page, I don’t see any way to actually add it to the homepage on my iPhone. Is this something that iOS doesn’t allow, or is there another way to do it? The game looks pretty cool though :)


In Safari hit the share button then scroll down and hit Add to Home Screen.


This.

Safari (and Firefox) does not have https://developer.mozilla.org/en-US/docs/Web/API/BeforeInsta... So you can’t have a custom button/way to prompt players to install.

However, they can install a PWA manually, by themselves; there is the option somewhere in their browser menu.


Installing the app on iOS is a pain point for users. If you have a significant iOS user presence it's a concern.

If Apple supported this API it would be much easier to convince stakeholders that PWA is enough.

You can do browser detection and show a dismissible pop up with instructions but it will still just confuse some users and others with scoff at the need to do that.


That’s interesting, thanks. I just did it successfully, I don’t think I’ve ever installed an app like this before. So I guess when I click it it’s just opening a browser window with no actual browser controls and then loading the site?


Exactly.

“it’s just opening a browser window with no actual browser controls”: yes, due to the `display` setting in the app manifest: https://developer.mozilla.org/en-US/docs/Web/Manifest/displa...

It’s similar to a `WebView` component: https://en.wikipedia.org/wiki/WebView


Why do they use the words progressive web app, seems like a fancy term for just saving a link to your home screen. Is there some additional benefit you get besides this shortcut? Does it do things a webpage does not once it’s been added to your home screen?


It basically is nothing more than a glorified shortcut. The installed app gets a custom load screen. It gets listed on the device installed apps list, and can be removed from there.

But there is nothing a PWA can do that a website can’t do. It’s all about Web APIs. Take push notifications (https://developer.mozilla.org/en-US/docs/Web/Progressive_web...): they make more sense for an (PW)app, but a simple website can do them too (if given permission).

See MDN intro on PWA: https://developer.mozilla.org/en-US/docs/Web/Progressive_web..., or https://web.dev/learn/pwa/ for more info.


Love it, super smooth! Played a quick game

https://freesolitaire.win/turn-one#25307


I'm really liking it, I've played multiple times and installed it. I will ask though: is it possible to remove the vibration?


Thanks for the feedback!

I understand your will to disable vibrations. But thing is, right now I can’t think of how to offer that option properly. For instance, adding a Setting menu+icon just for that would be lame.

I’ll think about it more, tho.


A burger menu in the top right where you then see settings and help.

Again, well done


Why does it let you sort through the card deck one-by-one? Ime mkst solitaire offers the top of a set of three.

Maybe it's just a different style of solitaire? This one seems too easy, though. Well done app, regardless - cheers! :)


There is also the “turn 3 by 3” mode! Please see https://news.ycombinator.com/item?id=40726628, just below in this thread.


Your buy a coffee link was not clickable on Firefox Android


OK, finally found a fix:

  /*
    Work around Firefox Mobile getting the hit target (clickable area)
    of the game control buttons wrong, when the (bottom) navigation bar
    gets hidden (when scrolling down).
    
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1813213
    and https://stackoverflow.com/questions/70893056/mozilla-android-addressbar-conflict-with-sticky-button-on-bottom
    and https://news.ycombinator.com/item?id=40733062 ← thanks @ttymck for the bug report!
  */
  if (/Mobile.+Firefox/.test(navigator.userAgent)) {
    self.addEventListener('resize', frameThrottle1(() => {
      document.getElementById('metagame').style.position = (window.outerHeight > window.innerHeight)
        ? 'sticky'
        : 'fixed';
    }));
  }


Oh thank you for that! Could reproduce that bug.

It’s because of https://bugzilla.mozilla.org/show_bug.cgi?id=1813213

I just spent a couple hours trying to find a clean workaround, without success… Will investigate more ASAP.

Thanks again!


Nice and clean!

How did you get it off the ground and gather first users?


Thanks!

Word of mouth, mainly. Posted it on Reddit back then, things like that. It grew organically from that. And, although it’s far from being on top results on SERP (search engine result pages), some people do find it that way.

Also: because it’s so lightweight, it got included some years ago in the Moya app (https://play.google.com/store/apps/details?id=nu.bi.moya), a popular messaging app in South Africa that is “data-free” for users (it does reverse-billing). Now half the players are South Africans!


I'm curious how many unique users you get daily/weekly/monthly?


What ad network are you using?


AdSense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: