Make games that run between phones.

A wildkit game is a plain HTML file. The players’ phones pass moves to each other directly, with no internet. Start in App Studio (opens in a new tab).

App Studio is live today. The wildkit app comes out in January 2027.

Quick start: a two-player tap race

The whole game in one file. Each tap is sent to the other phone; the first to 20 wins.

<button id="tap">Tap!</button> <p id="score"></p> <script> var mine = 0, theirs = 0; function show() { score.textContent = mine + ' : ' + theirs; } tap.addEventListener('touchstart', function() { mine++; wildkit.send({ taps: mine }); show(); if (mine === 20) wildkit.gameOver({ winner: wildkit.myPlayer }); }); wildkit.onReceive(function(data) { theirs = data.taps; show(); }); show(); </script>

Make it in App Studio (opens in a new tab), add an app.json with "minUsers": 2, and play it on two phones that are together.

App Structure

A wildkit app is a folder with an index.html entry point. All assets are bundled locally: no network access at runtime.

my-app/ app.json required: app metadata appIcon.png required: tile icon (120×120) index.html required: entry point *.js, *.css optional: local assets

The shell provides a back button, chat overlay, and keyboard toolbar automatically. Your app fills the entire screen behind these controls.

app.json

Every app must include an app.json manifest at the root of its folder.

{ "title": "Chess", "type": "game", "description": "Classic chess with multiplayer.", "howTo": "Tap to select, tap to move.", "minUsers": 2, "maxUsers": 2, "ageGroup": "4+", "artworks": [], "screenshots": [], "videos": [] }
FieldTypeDescription
titlestringDisplay name in the app listing
type"game" | "app"Games receive myPlayer and gameId
descriptionstringOne-liner shown under the title
howTostringInstructions shown before the game starts
minUsersintMinimum participants required
maxUsersintMaximum participants supported
ageGroupstring4+ 9+ 12+ 17+: Apple age ratings
artworksstring[]Filenames of artwork assets
screenshotsstring[]Filenames of screenshots
videosstring[]Filenames of preview videos

JavaScript API

The wildkit object is injected globally before your scripts run. No imports needed.

Properties

PropertyTypeDescription
wildkit.peers[{id, name}]All participants. First entry is always you.
wildkit.myPlayernumber1-based player number. Player 1 is the session host. Games only.
wildkit.gameIdstringSession UUID. Games only.

wildkit.send(data)

Send any JSON-serializable value to the other players. It goes phone to phone over the wildkit mesh: Bluetooth, hopping at most once through a friend’s phone.

wildkit.send({ fen: "rnbqkbnr/...", move: "e4" });

wildkit.onReceive(callback)

Register a callback for incoming data. The callback receives the data and the player number who sent it. Multiple callbacks supported.

wildkit.onReceive(function(data, player) { console.log("Player", player, "sent:", data); });

wildkit.gameOver(result?)

Signal that the game has ended permanently (checkmate, resign, player exits). Cleans up the session and its move history. Call this when the game is truly over: not on dismiss or between rounds.

wildkit.gameOver({ winner: "w" }); // white wins wildkit.gameOver({ winner: "draw" }); // draw wildkit.gameOver(); // generic end

wildkit.newRound()

Start a new round within the same session. Clears the move history but keeps the session alive: useful for games with multiple rounds like poker (preserves chip counts) or tic tac toe (preserves score).

wildkit.newRound();

wildkit.tts(text, voice?)

Speak text using on-device text-to-speech.

wildkit.tts("Checkmate"); // default voice wildkit.tts("Checkmate", "yelena"); // specific voice

Multiplayer

The same send / onReceive bridge handles every multiplayer pattern. All game logic lives in your HTML: the bridge is a transparent pipe.

PatternExampleHow it works
Turn-by-turnChessSend full game state on each move
SimultaneousStrategySend actions once both players submit
Real-timeActionSend at any frequency (Bluetooth allows about 20–30 messages a second)

Data flows: HTML → wildkit.send() → wildkit mesh → peer → wildkit.onReceive()

Game Lifecycle

Game sessions are persistent: they survive app backgrounding and device restarts. Moves are stored locally and replayed on restore.

Session flow

// 1. Game starts: wildkit.myPlayer and wildkit.gameId are set // 2. Players exchange moves via send() / onReceive() // 3. Round ends: show rematch UI // Both players choose: // Both tap “Play Again” → newRound() → new round, session stays // Either taps “Exit” → gameOver() → session deleted

Rematch pattern

Use send() to coordinate rematch choices between players. Both must agree before starting a new round.

// On round end, show X | Play Again buttons var myChoice = null, oppChoice = null; function chooseAgain() { myChoice = 'again'; wildkit.send({ choice: 'again' }); resolve(); } function chooseExit() { myChoice = 'exit'; wildkit.send({ choice: 'exit' }); resolve(); } function resolve() { if (!myChoice || !oppChoice) return; if (myChoice === 'exit' || oppChoice === 'exit') wildkit.gameOver(); else wildkit.newRound(); } wildkit.onReceive(function(data, player) { if (data.choice) { oppChoice = data.choice; resolve(); } });

Player number

wildkit.myPlayer is a 1-based index derived from the session’s player order. Player 1 is always the host. Use it to assign sides:

var myColor = wildkit.myPlayer === 2 ? 'b' : 'w'; // chess var myIndex = wildkit.myPlayer - 1; // 0-based array index

Text-to-Speech

On-device TTS with no network required.

wildkit.tts("Your turn"); // default voice (yelena) wildkit.tts("Your turn", "yelena"); // explicit voice
ParameterTypeDescription
textstringText to speak. Required.
voicestringVoice name. Optional, defaults to "yelena".

Chat

The native shell handles chat automatically. No JavaScript required.

Sandboxed Environment

Apps run in a fully sandboxed WKWebView. This is by design: wildkit games work with no internet at all.

The only way in or out is the wildkit bridge.

Starter Template

Copy this and start building.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> <title>My App</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; user-select: none; } html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a14; } </style> </head> <body> <script> // wildkit.peers : [{id, name}, ...] // wildkit.myPlayer : 1-based player number (games) // wildkit.gameId : session UUID (games) // wildkit.send(data) : send to peer // wildkit.onReceive(fn) : fn(data, player) // wildkit.gameOver(result?) : end game permanently // wildkit.newRound() : new round, keep session // wildkit.tts(text, voice?) : text-to-speech </script> </body> </html>

Identity & Backup

Your wildkit identity is a P-256 keypair generated on first launch. Your peer ID is the SHA-256 hash of your public key: it’s how other devices recognize you across sessions.

How it works

There is no in-app toggle. The decision to sync secrets is an OS-level trust decision, not an app-level one. wildkit doesn’t second-guess it.

What survives a phone change

Restore methodIdentityContactsGame sessions
Device-to-device migrationKeptKeptKept
Encrypted local backupKeptKeptKept
iCloud backup + iCloud Keychain onKeptKeptKept
iCloud backup + iCloud Keychain offNew identityLostOrphaned

Design rationale

wildkit has no account system and no password. The private key is the identity. (When contacts are apart, a relay forwards their messages and deletes each one once it’s delivered; it holds no accounts.) Losing it means starting fresh: there is no “forgot password” flow because there is no password. This is the trade-off of a peer-to-peer design: sovereignty over your identity, with the responsibility of keeping it backed up.

Open Protocol

wildkit runs on an open, documented mesh protocol. Any device: iOS, Android, embedded: can implement it and join the mesh. Every exchange uses typed packets with CRC32 integrity.

IDENIdentity handshake: announces presence, capabilities, mesh pages
IDUPIdentity update: already-known peer re-establishing connection
IACKIdentity acknowledgement: confirms IDEN/IDUP received
CREQContact request: peer wants to connect, subject to privacy policy
CREJContact reject: peer declined the contact request
INTRIntent: unified packet for messages, game moves, and all interactions
CMRQContent metadata request: asks peer for public content listing
CMRSContent metadata response: returns available pages and content
MREQMesh page request: pulls HTML content by page UUID
MRSPMesh page response: zstd-compressed HTML payload
PINGKeepalive: 30s interval, detects dead connections
PONGKeepalive response: auto-sent to keep peer alive

Tech Stack

LayerTechnologyDetails
DiscoveryCoreBluetoothBLE 5 advertising/scanning, short ID prefix, background-capable, ~30m range
TransportQUIC over NANNetwork.framework NWProtocolQUIC over Wi-Fi Aware, ALPN "wildkit", ~20ms latency
IdentityP-256 + TLS Mutual AuthKeypair in iOS Keychain, self-signed cert for TLS mutual auth on every session
UISwiftUI + UIKitNavigationStack architecture, UIKit for WKWebView and gesture layers
CryptoCryptoKitSHA-256 peer ID, CRC32 packet integrity, P-256 ECIES encryption, ECDSA signatures
SandboxWKWebViewNo network, no cookies, JS-Swift bridge via WKScriptMessageHandler, native tap gating
KeysiOS KeychainP-256 private key in Keychain with iCloud sync. Survives device migration when iCloud Keychain is enabled
StorageLocal-firstUserDefaults + disk for zstd-compressed mesh pages. No cloud sync, no telemetry