Playing
A Play button (a game controller) is in the message box. In Bot mode (bot chats, group chats, Bots home) and Code mode it shows as soon as the session opens, whether or not anything is running. In Chat it shows beside Stop after about five seconds of work, so quick replies never show it. While you type in the message box, the Play button steps aside; it comes back when the box is empty again. The game opens in a small window over the app. On Desktop it sits at the bottom right, and you can drag it by its top bar. On phones (theai.allternit.com phone layout and the m.allternit.com app) it sits just above the message box. The iPhone app works the same way: the Play button is always in the bot, group and Code composers, and beside Stop after five seconds on Home, and Settings → Advanced → Waiting games turns the games off (iPhone app → Waiting games). The message box stays usable, so you can still steer or queue a message.
The top bar of the window has:
If you opened the game while a bot was working, or a bot starts working while you play, the top bar shows Working…. With nothing running it shows no status. When the reply is ready, the game pauses and says so. Back to chat closes the game. Keep playing goes on. Best scores are kept on this device.
Every game picks up where you left it. Closing the window, switching to another game or a ready reply pauses it, and it carries on when you come back. Reloading the app starts the small games again. Gizzi RPG keeps its own saves.
The games
Gizzi RPG and Gizzi Brawl are the live games from gizzirpg.allternit.com and brawl.allternit.com, shown inside the window. They need a connection.
Turning it off
Settings → Appearance → Background → Waiting games turns the Play button on or off everywhere on Desktop and the web. In the iPhone and Android apps the switch is Settings → Advanced → Waiting games. It is on by default.For developers
src/components/waiting-games/in allternit-ai:waiting-games-engine.ts: the eight canvas games, plusSITE_GAMES(Gizzi RPG and Gizzi Brawl:url,hint,landscape).createWaitingGames(canvas, ui, racers)returnspick,pointer,click,key,setPlaying,resizeanddestroy. Best scores are stored inallternit.waitingGames.best.waiting-games.store.ts:useWaitingGames(open, expanded, game, work, owner) anduseWaitingGamesEnabled(appearance.waitingGames).WaitingGamesPlayButton.tsx: the Play button.anytimeshows it from mount (Bot and Code); without it, it shows after 5 s of work.hidden(set while the draft has text) hides it without unmounting. It stays mounted and callsreport(id, busy). Only the button that opened the game can mark the reply ready.WaitingGamesLayer.tsx: the window, portalled todocument.body. It is mounted besideBotCarryLayerinShellAppandPhoneProviders. Esc is handled in the capture phase, because app-wide shortcuts take it first. Once opened it stays mounted and is only hidden when closed, so the canvas game and the site games keep their place. For a site game it showsSiteGameFrame(an iframe under the top bar) instead of the canvas; alandscapegame in a window taller than wide gets the iframe rotated 90°. While focus is inside the frame, Esc goes to the game, so use ✕ or Full screen. A site game stays loaded once played; the window posts{type: "allternit:pause"}to it when it’s off screen, closed or waiting on Reply ready, and{type: "allternit:resume"}when it’s back. Gizzi RPG (js/gizzi.js) and Gizzi Brawl (main.js,HostPause) only accept these from their parent window, or from the page itself taggedfrom: "allternit-ios".
- The Play button is placed in
ThreadComposer(bot and group chats) andChatComposer(Chat and Code; full, compact and terminal layouts). - The site games’ hosts are in the CSP
frame-srcinpublic/_headers(ai.allternit.com) andfabric-session-pwa-functions/_site-headers.js(m.allternit.com). Desktop already allowshttps:frames (surfaces/allternit-desktop/src/main/security.ts). A new site game needs its host in both files. - iPhone:
Features/WaitingGames/insurfaces/allternit-mobile/ios.WaitingGameID.sitegives the URL and hint, andWaitingSiteGameViewshows it in aWKWebView, turned in UIKit for a landscape game so touches line up. The window stays mounted once opened, and the web view posts the same pause and resume messages on the page itself. - Android (native app):
feature/chat/src/main/java/com/allternit/feature/chat/games/insurfaces/allternit-mobile/android. The same eight canvas games, ported from the iPhone’s Swift, the same store rules (WaitingGamesStore.report), and the window mounted once inWorkspaceShell. The site games load in a locked-downWebView(JavaScript only there, no file access, only*.allternit.compages; other links open in the browser) that is turned in aFrameLayoutfor a landscape game, and it posts the same pause and resume messages taggedfrom: "allternit-ios", the tag the games accept from the page itself. The switch is Settings → Advanced → Waiting games (Android app → Waiting games). - Bot Race uses the first four of your bots (
isBotagents) as racers. With none, it uses four stand-in names.