GameTemplate

ETC

A starter template that pre-wires the infrastructure every new mobile game repeats — ads, purchases, i18n, deep links, haptics. Copy it, run the init script, implement the game logic, and you have a shippable structure.

ViteTypeScriptCapacitorAdMobRevenueCat

Overview

A starter template that pre-wires the infrastructure every new mobile game repeats. Ads, in-app purchases, i18n, deep links, haptics, storage and sharing — all the parts unrelated to the game itself that had to be rebuilt each time — are built once here. A new project starts as copy → initialize → implement the game logic.

What's included

  • Monetization — AdMob (banner, interstitial, rewarded) plus RevenueCat in-app purchases, including a remove-ads modal.
  • Platform bridges — Capacitor-based Android/iOS integration: deep links, haptics, status bar, device info, share, preferences.
  • Screen skeleton — home, FTUE (first-run tutorial), game, result and settings screens with a router.
  • Internationalization — i18n key structure and locale loading.
  • Init scriptinit-project.mjs replaces app name, package id and deep-link scheme placeholders in one pass.

Usage

Copy the template into a new folder and run node tools/init-project.mjs --name … --package … --scheme … to substitute the placeholders. From there only core/engine.ts (game logic) and render/render.ts (rendering) need implementing.

Stack

Vite + TypeScript + Capacitor 6, with Vitest for unit tests and Playwright for E2E.

No screenshots on this entry — in template state the screens correctly show TEMPLATE_APP_NAME and TODO placeholders. The real screens live in the individual games forked from this template.