While the Fun and Games Jam is running today, let me share one of the notable Perchance “game” generators that I really enjoy.

Back then I stumbled upon a Higher or Lower game but about Perchance Generators, in which you have to guess which one of the two generators has more or less views. The original was made by Ronin, https://perchance.org/higher-or-lower, which was created around 2022.

However, because Ronin wasn’t pretty much as active as now, someone made a fork that improves and pretty much completes the generator database much more: https://perchance.org/higher-or-lower-game, by adding newer generators and removing the deleted ones.

But, there’s one fatal flaw - the game just straight stops when the game picks a generator URL that doesn’t exist, not moving forward to the next screen, which was slipped in the list of both the original and the fork, which is kind of annoying. But thankfully, I made a pretty easy fix for that matter:

// Functions
  async function loadData(gen1, gen2) {
    newGen1 = await fetch(`https://perchance.org/api/getGeneratorStats?name=${gen1}`).then(r => r.json())
    newGen2 = await fetch(`https://perchance.org/api/getGeneratorStats?name=${gen2}`).then(r => r.json())
    
    console.log(newGen1, gen1, newGen2, gen2)

    // Add these around the code:
    if (newGen1.status == "generator-does-not-exist") {
      return loadData(getRandomGen(), gen2);
    }
    if (newGen2.status == "generator-does-not-exist") {
      return loadData(gen1, getRandomGen());
    }

    newGen1.data.name = gen1
    newGen2.data.name = gen2
    
    return [newGen1.data, newGen2.data]
  }

There we go. Now I can play endlessly, getting the highest score possible, without any disruptions ever again. Overall, it’s great, not only that it’s fun to play, but also makes you keep track on the view counts of the generators. I also didn’t know that the emoji generator has over a million views now, time’s really speeding up. 😁

I’d like to suggest adding more generators like those ai- generators (such as ai-text-to-image-generator and alike that is listed on my view counter experiment’s AI Things menu and those from my generator hub collection page, to further expand the database.

And btw, the fork is hosted on KasaLobster’s hub page, I don’t know if they own the fork at all, but shoutout to the person!