PocketVibe

Make a game for PocketVibe

Describe a game to your AI coding tool, play it in your browser, then on your own handheld, and send it to the store. Games are three.js web pages; the starter project and our brief teach your AI the handheld, so the game runs at 60 fps there too.

From an idea to the store

  1. 1

    Start the project

    You need Node.js 22 or newer and an AI coding tool such as Claude Code, Codex or Cursor.

    npm create pocketvibe@latest my-game
    cd my-game
    npm install
  2. 2

    Give your AI the brief, then your idea

    The brief holds the handheld's measured limits, the rules that keep a game smooth there, and how to try it and publish it. Start your AI tool in the project's folder and tell it:

    Read https://pocketvibe.cobanov.dev/agents.md and follow it. Then make me a PocketVibe game: a snowboard race down a mountain, dodging trees.

    The project's own AGENTS.md has the same rules in more detail, with code; your AI reads it too.

  3. 3

    Play it in your browser

    npm run dev shows the game at the handheld's size. Arrows are the d-pad; X is A, Z is B, S is X, A is Y, Q and W are L and R, Enter is Start and Shift is Select. P shows the performance overlay, which turns red when the game is too heavy for the handheld. The links under the screen try the other screen shapes.

  4. 4

    Play it on your handheld

    With the handheld on the same network as your computer, run this in the game's folder:

    npx pocketvibe serve

    It prints an address like http://192.168.1.20:8740. In PocketVibe on the handheld, open Settings > Stores > Add a store and type it. Your game is then in the Store tab as "(dev)": A downloads it. Each change you make is built again, and the Store offers it as an update. Works on ROCKNIX and Android.

  5. 5

    Send it to the store

    Fill in pocketvibe.json (a unique id, the title, version 1.0.0, a description, the genre and the controls) and add a 480×270 cover.png. Store games are open source: put yours in a public GitHub repository (gh repo create my-game --public --source . --push), then:

    npx pocketvibe publish

    It opens a pull request to the store's repository, like F-Droid: the game is built from its source and checked there, we play it, and once it is merged it is on every PocketVibe handheld.

  6. 6

    Update it

    Raise version in pocketvibe.json, commit, push and publish again. Players get the update in the Store.

What the handheld can draw

Games are written for the weakest handheld PocketVibe runs on: an Allwinner H700 with four Cortex-A53 cores, a Mali-G31 MP2 GPU and 1 GB of memory, behind a 720×480 screen. Code that is instant on a laptop can run at 5 fps there. We measured these limits on an Anbernic RG34XX SP, raising one cost at a time until the frame rate fell. A game has 16.7 ms per frame for 60 fps.

WhatFor 60 fpsPast it
Triangles inside the view10,00015,000: 48 fps · 20,000: 39 fps · 30,000: 28 fps
Draw calls100about 30 µs each
MaterialsLambert, Basic, ToonPhong 54 fps · Standard 37 fps · Physical 29 fps
Lights1 hemisphere + 1 directionaleach point light about 3 ms · 4 of them: 37 fps
Shadowsnonethe cheapest shadow map: 36 fps
Transparent layers over the screen12: 52 fps · 4: 41 fps
Particles1,000 small5,000 small: 39 fps
Post-processingnoneFXAA 45 fps · bloom 40 fps
Your own JavaScript8 ms a framethe CPU is about ten times slower than a laptop's
Memory for assets150 MBthe system struggles past about 300 MB

The first use of anything costs a long frame, so a game prepares everything while it loads:

First use ofCosts
A material (shader compile)40 to 120 ms300 ms with shadows
A PNG texture30 ms512×512; 100 ms at 1024×1024
A 50,000-triangle geometry130 msuploaded on first draw

How games stay inside it

The performance guide explains each limit with code, and the full results have every measurement.

Screens and buttons

What we check before a game goes into the store

Everything happens in the open, on the game's pull request: what the check found, what we ask to change, and why. Questions and ideas are welcome on GitHub.