Testing with the simulator
You need no phone, no TV and no children in front of a camera. The simulator at simulator.fabiplay.app opens the game in the same sandboxed frame and with the same host as the TV. Instead of children there are puppets you move with the keyboard and the mouse, and the game gets the same messages it would get on the TV. Every message between Fabi Play and the game goes in a log.
The simulator’s interface is in Italian, like the TV. This page quotes its labels as they appear on screen, «like this», with a translation.
Opening your game
Section titled “Opening your game”- Start your game the way you usually do, for example with your own Vite dev server on
http://localhost:5173. - Open https://simulator.fabiplay.app in Chrome or Firefox.
- Paste your game’s page into the address field at the top (for example
http://localhost:5173/index.html) and press «Carica» (Load) or Enter.
The game starts at once. The address goes into the page’s own address as ?game=…, so you can bookmark it or send
it to someone:
https://simulator.fabiplay.app/?game=http%3A%2F%2Flocalhost%3A5173%2Findex.htmlhttps://simulator.fabiplay.app/?game=https://games.example.com/stars/1.2/index.htmlWithout ?game=, the simulator opens Pioggia di stelle (Star Shower), Fabi Play’s own game.
What your game’s server must allow
Section titled “What your game’s server must allow”Framing. The simulator shows your game in an iframe, so your server must not forbid it:
- no
X-Frame-Options(or notDENY/SAMEORIGIN); - no
Content-Security-Policy: frame-ancestorsthat leaves outhttps://simulator.fabiplay.app.
A plain Vite dev server sends neither, so it works as it is. If your game already has a CSP for
publishing, add the simulator to its frame-ancestors:
frame-ancestors https://play.fabiplay.app https://cast.fabiplay.app https://simulator.fabiplay.appCORS on fabi-play.json. The simulator reads fabi-play.json next to your page to check the
manifest. That is a fetch from another origin, so the server must answer with
Access-Control-Allow-Origin: https://simulator.fabiplay.app (or *). Vite only allows localhost origins by
default. In your vite.config:
export default { server: { cors: { origin: [/^https?:\/\/localhost(:\d+)?$/, 'https://simulator.fabiplay.app'] }, },}Without CORS the game still runs. Only the manifest check fails, with «Non riesco a leggere …» (I can’t read …).
A localhost game from an https page
Section titled “A localhost game from an https page”The simulator is served over https, and your dev server is usually plain http. That is fine for localhost: Chrome
and Firefox treat http://localhost and http://127.0.0.1 as trustworthy, so they are not blocked as mixed content.
A game on another machine, or on your LAN IP (http://192.168.1.20:5173), is different:
- plain http on a LAN IP is mixed content and is blocked. Serve the game over https (for example with
@vitejs/plugin-basic-ssl) and accept its certificate first by opening the game’s page in its own tab; - Chrome’s Local Network Access asks for permission when a public site reaches an address on your network (“…wants
to look for and connect to any device on your local network”). Choose Allow. Recent Chrome versions can ask for
localhosttoo.
Safari does not treat http://localhost from an https page the same way. Use Chrome or Firefox, or serve the game
over https.
The intro
Section titled “The intro”If your fabi-play.json has an intro, the simulator plays it on every load, before the game, as the
TV does the first time a child plays it: the steps with Fabi’s bubble, the images, the moves with the puppets’
avatars (move them with the keys to tick a practice step), then «Pronti?», which waits for every puppet’s arms up
(U) or «Inizia ›». The mouse is a hand on its «Inizia ›» pill. «Partita» shows how many steps the manifest declares,
and the log what the phone would get (intro · passo 2 di 4 · «…»). Fabi is silent here: the voice clips are
generated when the game is published. The pause gets «Rivedi la spiegazione».
Keys and mouse
Section titled “Keys and mouse”The keys move the selected puppets (see «Chi muovi», Who you move). Every movement reaches the game as it would from a child: a pose, and the gesture the host reads in it.
| Key | Movement of the selected puppet |
|---|---|
| Space | Jump (jump, then land) |
| ↓ held | Squat (squat, then stand when you release it) |
| ← → | One sideways step: left lane, centre, right |
| C | Clap |
| F | Statue (freeze); F again to move (move) |
| U, L, V, S | Shapes: arms up, wide, V, star; the same key again lowers them |
| X | Arms crossed on the chest: Fabi Play’s own gesture (held 1.5 seconds, it pauses the game) |
| Z | A big X above the head: the same gesture’s other form |
| X | Arms crossed in front of the chest: the same gesture, the older way |
| A, D | One arm stretched out sideways, left or right: how a child answers Fabi Play’s two-button choices (the pause, the end), held 1 second |
| H | Steps out of frame, and back in (every puppet out for 3 seconds: the game pauses) |
| 1–4, T | Who you move: one player, or all together |
| P, Q, R | Pause and resume, quit, reload the game |
| N, E, K | The intro: next step, repeat the step, skip it |
| I | In the pause: «Rivedi la spiegazione», the intro again |
The keys do nothing while you are typing in the address field or a menu has focus, or when Cmd, Ctrl or Alt is held.
The mouse as a hand. With «Il mouse sul gioco è una mano» (The mouse over the game is a hand) on, the mouse pointer over the game is the hand of the selected puppets: the puppet’s wrist goes under the mouse, on the side of the body the pointer is on. In Fabi Play’s own pause screen and notices the mouse is the menu cursor instead; staying on a button for 1.5 seconds presses it, as a child’s hand does on the TV.
«Mostra dove arrivano le mani» (Show where the hands land) marks each wrist the game gets (smoothed) at
toScreen(wrist): a dashed ring with a cross in the player’s colour, labelled 1S for player 1’s left hand
(sinistra) and 1D for the right (destra). If your game draws its hands with toScreen, the marks sit on them.
The panel
Section titled “The panel”«Partita» (Match). Changing any of these restarts the game with a new start, except the camera rate.
| Control | What it does |
|---|---|
| «Fascia» (Age range) | The ageRange |
| «Giocatori» (Players) | 1 to 4 puppets |
| «Lingua» (Language) | The locale: Italian or English |
| «Schermo» (Screen) | «TV 16:9» or «Tablet 4:3»: the frame’s shape and the mode (tv or solo) |
| «Fotocamera» (Camera) | 30 or 60 poses a second, as phones send them |
| «Audio spento (muted)» | muted |
| «Pubblicità a ogni pausa…» (Ad at every break) | Every break() gets a fake 3-second ad, without waiting for the 5 minutes the rules require |
| «Mirror (webcam)» | Your webcam under the game, mirrored and cropped as the phone’s video on the TV, and backdrop: 'video' to the game: to check that its background is transparent. The puppets still move the game, not you |
«Personaggi» (Characters). One menu per player, to change the avatar mid-game, as a child can.
«Inquadratura» (Framing). As the TV frames far children (automatic framing):
with a size in «Distanza dallo schermo» and a puppet moved back (say 4 m), the image zooms in on the puppets at the
next pause or break, never during play. «Inquadratura automatica» (on by default) turns it off: the whole image at
once. «Mostra l’immagine della telecamera» draws a dashed outline where the whole camera image is. Two pills say the
zoom now («Zoom adesso: 1,0×») and the one the next stop would pick («Prossimo stacco: 1,8×»); the log says
«inquadratura 1,0× → 1,8×» at each change. A game whose manifest says "framing": "fixed" shows «Il gioco chiede
l’immagine fissa» and keeps 1,0×.
«Telefono del genitore» (Parent’s phone). «Pausa» (P), «Esci» (Q), «Ricarica» (R), and the intro’s buttons: «Intro: Ripeti» (E), «Avanti ›» (N), «Vai al gioco» (K), «Rivedi la spiegazione» (I).
«Punti» (Points) shows the last score of each player, and «Registro» (Log) every message, newest at the
bottom: «gioco → Fabi Play» (what the game sent), «Fabi Play → gioco» (what the host sent), and «attenzione» for
warnings. Poses are not logged.
The stats line under the game shows the state («In attesa di «ready»…», Waiting for ready; «In gioco», Playing; «In pausa», Paused; «Finito», Over), the poses received per second, how often the game draws its avatars («gioco disegna N fps», counted by the SDK), and each player’s lane, shape and avatar. A game on the engine, or one that reports its stats, adds how it draws: its renderer, tier and own frame rate, for example «· webgl2 · tier medium · 60 fps». The first second after a start may show a low rate (the engine’s probe).
The «Motore» (Engine) panel
Section titled “The «Motore» (Engine) panel”For games made with the Fabi Play engine; other games ignore it. Each change reloads the game.
| Control | Values | What it does |
|---|---|---|
| «Renderer» | «Automatico» (Automatic), «WebGL 2», «WebGL 1», «Canvas 2D» | Adds ?renderer=webgl2, webgl1 or canvas2d to the game frame’s address (not to the address field): the engine draws with it, or falls back as usual if the browser can’t. «Automatico» adds nothing |
| «Tier» | «Automatico», «Alto» (High), «Medio» (Medium), «Basso» (Low) | Adds ?tier=high, medium or low: the engine starts at that quality tier and never steps it down. «Automatico» adds nothing |
| «Suggerimento TV» (TV hint) | «Nessuno (browser)» (None), «Alto», «Medio», «Basso» | The tier a TV’s screen sends in init (play.device), with the display’s rate the simulator measured. Without a forced «Tier» the engine starts there (no higher than the tier it cached for this game) and skips its probe; it still steps down if frames are slow. «Nessuno» sends only the rate, as a plain browser would |
The log shows the forced address («Forzati dal pannello Motore: ?renderer=…», Forced by the Engine panel), and the
init line shows the hint («dispositivo tier low, 60 Hz», device).
To see the weakest TV on your laptop: «Renderer» «Canvas 2D» and «Tier» «Basso». To see where the engine starts on a TV without forcing it: «Renderer» and «Tier» «Automatico», and a «Suggerimento TV».
What the simulator checks
Section titled “What the simulator checks”- The manifest. It reads
fabi-play.jsonnext to the game’s page and shows its title, version, age ranges, players and movements, or «fabi-play.json non valido» (invalid) with the errors. It warns if the game would not appear for the chosen age range or number of players, if the declaredentryis not the page loaded, and reminds a game declaringbackdrop: videonot to paint an opaque background. ready. If the game does not sendreadywithin 10 seconds, the log says so: on the TV it would be closed («Il gioco non risponde», The game is not responding).- Messages. Invalid messages, and messages from another origin than the game’s, are logged (with the first 200 characters) and ignored, as the TV ignores them.
- The sandbox. The frame is the TV’s:
sandbox="allow-scripts allow-same-origin", no permissions, no referrer. What fails here fails on the TV. - The hands. It draws rings where the hands land, so you can compare them with what the game draws.
What it does not simulate
Section titled “What it does not simulate”- A real camera. The puppets are perfect bodies: no noise, no lost limbs, no children half out of frame. Test with a real phone before publishing.
- Latency. The poses reach the game at once. On the TV there is the phone’s camera, the pose model and the home Wi-Fi in between.
- The TV’s performance. Your laptop is much faster than a TV or a cheap tablet: «gioco disegna» on a laptop says nothing about a TV. The «Motore» panel forces a TV’s renderer and tier, not its speed.
- The rest of Fabi Play. No game list, no QR code, no phone, no Chromecast, no real ads.
Troubleshooting
Section titled “Troubleshooting”The game frame is blank.
- Look at the browser console of the simulator page. “Refused to frame … because an ancestor violates the following
Content Security Policy directive: frame-ancestors” means your game does not allow the simulator: see
What your game’s server must allow. The same for
X-Frame-Options. - An https game with a self-signed certificate: open the game’s page in its own tab and accept the certificate.
- A wrong address: open it in its own tab. The simulator only loads it.
- The stats line stays at «In attesa di «ready»…»: the game loaded but never said
ready. Isfabi-play.jsloaded? Withdata-ready="manual", does the game callFabiPlay.ready()? With npm, does it callplay.ready()?
«Non riesco a leggere …/fabi-play.json»: the file is missing, or your server does not send CORS headers for the simulator’s origin. The game still runs.
Port 5173 is taken. Vite’s default port is 5173. If you also run Fabi Play’s own repository (pnpm dev), start
your game on another port (vite --port 3000) and paste the address Vite prints.
The keys do nothing: click on an empty part of the page first. The keys are ignored while the address field or a menu has focus.
Running the simulator locally
Section titled “Running the simulator locally”The Fabi Play team (and anyone with the fabiplay-app repository) can run the same simulator locally: pnpm dev,
then https://localhost:5173/simulator.html?game=<url>. The repository’s docs/simulator.md has every detail: the
certificate, FABI_HOST, the http mirror, deploying simulator.fabiplay.app.