DEV Community

Cover image for Shipping new mini games to an Android app without app updates: a remote catalog, account-free voting and per-game SEO pages
Godivin
Godivin

Posted on Fully Autonomous

Shipping new mini games to an Android app without app updates: a remote catalog, account-free voting and per-game SEO pages

I run a small hub of one-finger puzzle games: frogs hopping over frogs on a rainy pond, measuring rain with jars to water pots exactly, squeezing paint tubes in the right order to copy a painting. There are 45 of them right now and a new one lands roughly every hour. They are playable in the browser and inside an Android app that's in closed testing.

This post is about the plumbing that makes that workable for one person: how new games reach the app without a store update, how players can rate games without an account, and how each game gets its own indexable page. Nothing here is exotic, but the combination took some iterations, so I'm writing it down.

1. Each game is a single HTML file with a tiny contract

Every game is one self-contained index.html: a <canvas>, inline JS, no dependencies, no network calls. Graphics are drawn in code and sounds are synthesized with Web Audio, so a game is usually 50 to 60 KB.

The only contract between a game and the outside world:

  • Input is Pointer Events only (pointerdown/move/up with touch-action: none). Mouse, touch and automated test input all go through the same path.
  • window.GAME is kept up to date every frame: state (menu | play | win | lose), level, moves, and the screen rectangles of HUD buttons.
  • Level solutions live in meta.json as tap coordinates in a fixed 390x844 space.

That last part turned out to be the most useful decision. Because every level ships with a stored solution, a headless browser can replay it, which gives me:

  • a regression test for every level after any change,
  • a check that random tapping does not win (more on that below),
  • real gameplay videos and screenshots for store listings, generated by script instead of recorded by hand.

The replay script maps the 390x844 coordinates onto whatever size the canvas ended up at:

const r = await page.evaluate(() => {
  const b = document.querySelector('canvas').getBoundingClientRect();
  return { x: b.x, y: b.y, s: b.height / 844 };
});
const tap = (x, y) => page.touchscreen.tap(r.x + x * r.s, r.y + y * r.s);
Enter fullscreen mode Exit fullscreen mode

2. Puzzles are generated, then checked by a solver and by a "random player"

The games are puzzles with a par move count, so every level must be solvable and the par must be real. Each game has a small rules module that is shared by the game and the level generator, plus a solver (DFS or BFS depending on the puzzle). Levels are only kept if the solver finds a solution, and par is the solver's shortest one.

The check that changed the most games: simulate a player who taps randomly and measure how often they win. Early on, several games could be beaten by mashing the screen. Now a level is rejected if random play wins it too often after the first couple of tutorial levels; typical values for later levels are 1 to 7 percent.

3. New games reach the Android app without an update

The Android app is a Capacitor wrapper around the same hub that runs on the web. The app does not bundle the games. It fetches a catalog.json:

{
  "version": 1,
  "count": 45,
  "games": [
    {
      "id": "041",
      "slug": "lily-leap",
      "name": { "en": "Lily Leap", "tr": "Lily Leap" },
      "levels": 16,
      "url": "/games/041-lily-leap/8d6cd62ea242/index.html",
      "sha256": "..."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Two details matter:

  • Content-hashed game URLs. The path contains a hash of the file, so a game URL is immutable and can be cached forever. Updating a game produces a new URL in the catalog; there is no "stale game in the WebView cache" class of bugs.
  • The catalog is the only thing that changes. Publishing a game means uploading one file and rewriting one JSON document. The app picks it up on the next launch.

Google Play's policy allows this as long as what you download is web content running in the WebView, not new native code, which is exactly the case here.

4. Ratings without accounts

I didn't want sign-ups, but I did want "one vote per game per device". The setup is a Cloudflare Worker in front of a D1 (SQLite) database:

  • The client generates a random UUID once and keeps it in local storage. That is the device_id. No IP address is stored.
  • Ratings use the pair (game_id, device_id) as the primary key, so voting again simply updates the earlier vote:
INSERT INTO ratings (game_id, device_id, stars, platform, updated_at)
VALUES (?, ?, ?, ?, ?)
ON CONFLICT(game_id, device_id) DO UPDATE SET
  stars = excluded.stars, updated_at = excluded.updated_at;
Enter fullscreen mode Exit fullscreen mode
  • A replay of the same game by the same device within 30 minutes doesn't count as a new play.
  • Rate limiting uses Workers' built-in rate limit bindings: 60 requests per minute per device+IP and 300 per IP.
  • Comments are write-only. There is no public endpoint that returns them, so there is nothing to moderate in public and no reason to spam.
  • DELETE /api/device/<id> wipes everything stored for a device, which keeps the privacy story simple.

Is a client-generated UUID abusable? Of course: clear storage and vote again. For a hobby leaderboard that's an acceptable trade-off. The monthly ranking also relies on behaviour that is harder to fake than stars: return rate, time per player, how many players reach level 5, and replays, with a minimum of 100 unique players before a game is eligible.

5. One indexable page per game

A single-page hub is invisible to search engines, so the build step writes a static page per game and language (/en/game/<slug>/): title, description, canonical URL, hreflang alternates, Open Graph image from the game's cover, and JSON-LD. The same step regenerates sitemap.xml and pings IndexNow with the new URLs. Search Console picked up the sitemap the same day.

6. How the games are made, honestly

The games themselves are built by AI coding agents on a schedule. I set up the pipeline and the rules above (single file, Pointer Events, solvers, random-player check) and decide what ships. The game code is written entirely by agents, and the hub, backend and app were built with heavy AI assistance too. After a game is built, three separate reviewer agents play it in a headless browser with touch input and score it.

What I learned from running it for a few days:

  • The automated checks are worth more than the generation. Solvers and the random-player test caught far more real problems than any "is this fun" judgement.
  • Reviewer agents are harsh on originality (around 6 out of 10), and they are right: most games are a known puzzle type with a new theme.
  • Agents can't tell what's fun. That's why the hub has ratings: players decide which game gets turned into a proper standalone app at the end of the month.
  • People react strongly to "AI made this". When I led with the pipeline in a game-dev forum, the response was mostly negative. Fair enough. I think the honest framing is: here is a game, try it, and here's how it was made if you care.

If you want to see the result, the hub is at hyper.godivin.com. No sign-up and no ads, and it works with a mouse. I'd especially like to hear which game felt unfair.


Disclosure: this article was drafted by an AI agent from the project's code and notes, and the games it describes are built by AI coding agents as explained in section 6.

Top comments (0)