News for hackers. Stuff that matters.
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @03:10AM (#40725658)
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 ;-)

Re:Ask HN: Who has had a successful PWA product? by jb1991 on Wednesday June 19, 2024 @03:12AM (#40725673)
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 :)
Re:Ask HN: Who has had a successful PWA product? by nefarious_ends on Wednesday June 19, 2024 @03:18AM (#40725710)
In Safari hit the share button then scroll down and hit Add to Home Screen.
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @04:10AM (#40726009)
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.

Re:Ask HN: Who has had a successful PWA product? by jb1991 on Wednesday June 19, 2024 @04:54AM (#40726279)
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?
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @05:06AM (#40726364)
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

Re:Ask HN: Who has had a successful PWA product? by jb1991 on Wednesday June 19, 2024 @07:13AM (#40727118)
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?
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @07:40AM (#40727288)
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.

Re:Ask HN: Who has had a successful PWA product? by goosejuice on Wednesday June 19, 2024 @10:26AM (#40728640)
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.

Re:Ask HN: Who has had a successful PWA product? by nefarious_ends on Wednesday June 19, 2024 @03:29AM (#40725786)
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?
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @04:05AM (#40725985)
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. […]”

Re:Ask HN: Who has had a successful PWA product? by moralestapia on Wednesday June 19, 2024 @10:39AM (#40728758)
>I came up with it by myself.

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

Re:Ask HN: Who has had a successful PWA product? by raybb on Wednesday June 19, 2024 @03:56AM (#40725942)
What ad network are you using?
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @04:04AM (#40725980)
AdSense.
Re:Ask HN: Who has had a successful PWA product? by jb1991 on Wednesday June 19, 2024 @05:08AM (#40726376)
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.
Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @05:48AM (#40726628)
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”.

Re:Ask HN: Who has had a successful PWA product? by danmur on Wednesday June 19, 2024 @10:48AM (#40728849)
That's how I learned it too.
Re:Ask HN: Who has had a successful PWA product? by morbicer on Wednesday June 19, 2024 @12:53PM (#40730042)
Nice and clean!

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

Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @01:51PM (#40730663)
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!

Re:Ask HN: Who has had a successful PWA product? by metadat on Wednesday June 19, 2024 @12:55PM (#40730066)
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! :)

Re:Ask HN: Who has had a successful PWA product? by palsecam on Wednesday June 19, 2024 @01:48PM (#40730634)
There is also the “turn 3 by 3” mode! Please see https://news.ycombinator.com/item?id=40726628, just below in this thread.
Re:Ask HN: Who has had a successful PWA product? by ttymck on Wednesday June 19, 2024 @06:24PM (#40733062)
Your buy a coffee link was not clickable on Firefox Android
Re:Ask HN: Who has had a successful PWA product? by palsecam on Thursday June 20, 2024 @07:33AM (#40737455)
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!

Re:Ask HN: Who has had a successful PWA product? by palsecam on Friday June 21, 2024 @04:20AM (#40747350)
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';
    }));
  }
Re:Ask HN: Who has had a successful PWA product? by furyofantares on Wednesday June 19, 2024 @08:21PM (#40733706)
I'm curious how many unique users you get daily/weekly/monthly?
Re:Ask HN: Who has had a successful PWA product? by casper14 on Wednesday June 19, 2024 @10:43PM (#40734380)
Love it, super smooth! Played a quick game

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

Re:Ask HN: Who has had a successful PWA product? by toldyouso2022 on Thursday June 20, 2024 @06:47PM (#40744283)
I'm really liking it, I've played multiple times and installed it. I will ask though: is it possible to remove the vibration?
Re:Ask HN: Who has had a successful PWA product? by palsecam on Friday June 21, 2024 @01:43AM (#40746529)
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.

Re:Ask HN: Who has had a successful PWA product? by toldyouso2022 on Friday June 21, 2024 @07:23AM (#40748372)
A burger menu in the top right where you then see settings and help.

Again, well done