# How to test game updates without breaking your live build

> How immutable builds, separate staging environments, and isolated databases let you test balance tweaks and schema changes safely—and roll back in seconds.

Published: 2026-11-14 · Updated: 2026-12-01 · Canonical: https://pita.sh/blog/roll-back-a-bad-game-update

To test game updates without breaking your live build, use two habits from web engineering: **deploy experimental changes to a separate staging URL**, and **treat every published build as immutable** so rolling back just switches a pointer instead of rebuilding from an old commit.

## 1. Keep a separate staging or playtest slot

Overwriting your only live URL right before a playtest is risky—one broken input handler, missing texture, or save-format change affects everyone immediately.

Depending on your hosting setup:
- **Static hosts (Cloudflare Pages, Vercel, Netlify):** Push changes to a Git branch like `playtest` or `balance-v2` to get an automatic preview URL while `main` stays untouched.
- **itch.io:** Keep a separate unlisted/restricted project (e.g. `my-game-beta`) for experimental builds, or use separate `butler` channels.
- **Pita:** Publish directly to an isolated environment with one command (or ask your coding agent to run it):

```sh
pita publish --to playtest --create --name "v0.4-combat" --description "Faster dodge cooldown"
```

The `playtest` environment gets its own shareable link, its own secrets, and its own SQLite database if your game uses a server (up to 10 isolated environments per game on Basic), while sharing uploaded asset blobs with production.

## 2. Isolate save data and databases for schema changes

If your game persists player profiles, inventories, or leaderboard scores, never point a test build at your production database. A migration that renames a column or changes JSON save structure can break live players even if you revert the frontend. Give each staging environment its own database or schema, and test migrations there first.

## 3. Keep builds immutable for fast rollbacks

When you publish a build, keep previous builds intact rather than overwriting files in place.

- **Promoting a tested build:** Once `playtest` is verified, promote that exact build ID to `production` rather than triggering a fresh rebuild that might pull a different dependency or local change.
- **Rolling back:** If players report a regression after a release, point `production` back to the previous build ID. On Pita, you can do this with one click in the Builds tab or by asking your coding agent to call `deploy_build` with the previous build ID. Because players' browsers cache build chunks, rolling back transfers almost no data on refresh.

## FAQ

### Should I include patch notes with each build?
Yes—even a one-line summary (`"Fixed jump buffer on 120Hz displays"`) makes it obvious which build to roll back to when something breaks, and gives playtesters context on what to check.

### Do extra environments duplicate my asset storage?
If your host uses content-addressed storage (like Pita's `assets.lock` and FastCDC build chunks), creating `staging` or `playtest` environments reuses identical asset and build chunks without duplicating storage.
