My last crusade (my engine for making graphic adventures with AI)
I've got a soul full of passions. I'm crazy about music, architecture, art, the work I do (but let's not say that out loud), DIY, cooking badly for my wife, et cetera. I'm terrible at all of them, except cooking badly for my wife.
Another small passion is video games, and like any self-respecting almost-forty-year-old I own every console of this generation and have collected pretty much all of the last few. Even so, I'm not much of a gamer, except when it comes to adventure games, graphic adventures, which I devoured and dreamed about from when I was a kid, almost as if they were my real Bible, my real fountain of youth.
My Commodore 64 ran Mystery House, but neither my brother nor I knew how to type the commands in English (still don't).
Then Indy 3 hit the cinemas, and with it came the game, strictly on pirated floppies. Love at first sight. And then, again on pirated floppies, came the game about pirates: love at first sight, the love of my life, The Secret of Monkey Island.
From there it's history, because my longest-running passion is the one for the series and for LucasArts in general. Return to Monkey Island almost made me cry, and to play it I asked for three days off (from myself, since I was freelancing). Forget GTA VI! One day I'll write a post about my passion for Monkey Island and about the documentary on the series, which I abandoned because I'm an idiot.
All my passions go through creating. Creating is the leitmotif of this space and of my life, and in a previous life I wanted to be a writer: to date I have a sci-fi story, a novel about a comedian who isn't funny (which came before Joker) and lots of little stories worthy of Spielberg's Amazing Stories, and a graphic adventure, when you get down to it, is a story you play.
I've ALWAYS wanted to make a graphic adventure, and I've envied the friends who pulled it off, including the people behind The Booze of Monkey Island. Even the first tools that got me into coding came from wanting to make games, and they were all failed attempts: The Games Factory, which gives you a good grounding in the architecture you can't do without, Adventure Game Studio, nice, and Visionaire, which I think is one of the most complete engines for making graphic adventures, and which I even took a paid course on two years ago, taught by Stefano Rossitto, the creator of The Hand of Glory 1 and 2.
But then I never actually started.
Meanwhile, at work, I was building up my experience as a product builder, and today, like a lot of people right now, I'm making my own fantastic engine: GRAIL, Generative Runtime Adventurer Interaction & Logic. It's the closest thing to creating a graphic adventure entirely with AI, and the tagline, since I haven't fully disowned marketing, is Prompt & Click.
How it's made
GRAIL takes a lot from the best of what I've seen in earlier engines, and to run the game it uses Phaser, a JavaScript framework for 2D games. It's a Mac app (built with Electron, so there's a browser inside, but it opens like any other program), and the Phaser running in the preview while I build is the same one that runs the finished game.
Anyone who has used Visionaire will recognise the editor, and that's on purpose. On the left there's the game menu, with rooms, characters, objects and puzzles, in the middle the room I'm working on, on the right its settings. I draw the area where the character can walk and the path points by hand on the background, like in Visionaire's way system, with the mouse coordinates updating in real time. The puzzle logic, on the other hand, is made of conditions and actions (when this happens, if that's true, do this), which is exactly the grounding The Games Factory gave me.
The terminal is what makes the difference. Inside GRAIL there's a real terminal, with two sessions, one for Claude Code and one for Codex, opened in the game's folder. It isn't a custom-built chat: they're the same programs I use every day, on my own subscriptions, so no pay-as-you-go APIs. From there I ask for a room, a puzzle or a dialogue and the agents work directly on the game files, while the backgrounds I get Codex to draw.
What they do doesn't go into the game on its own, though. Every proposal shows up in the editor dashed, in another colour and with the name of whoever made it, and I decide whether to accept it or throw it away. My changes and the agents' go through the same system, with the same undo, and every piece of the game remembers who made it, me, Claude or Codex, because in an engine built with AI the first thing I want to see is who did what.
When the game is finished, it comes out of GRAIL as a web page that works on its own, with no Claude, no Codex and nothing to install. AI is for building it, not for playing it.
The test game, for now, is a detective's office. Inside GRAIL there are also the characters, who are all born from a wooden mannequin, and the puzzles, which sit in a graph from the start to the end.
But that's part 2.
side quest ·
La mia ultima crociata (il mio engine per creare avventure grafiche con l'AI)
La mia è un'anima piena di passioni. Impazzisco per la musica, l'architettura, l'arte, il lavoro che faccio (ma non diciamolo a voce alta), il fai da te, cucinare male per mia moglie, eccetera. Sono tutte cose che mi riescono malissimo, tranne cucinare male per mia moglie.
Un'altra piccola passione sono i videogiochi, e come ogni vero quasi quarantenne ho tutte le console di questa generazione e ho collezionato praticamente tutte quelle delle ultime. Ma nonostante questo non sono un grande giocatore, tranne che per gli adventure game, le avventure grafiche, che fin da piccolo ho divorato e sognato, quasi come fossero la mia vera Bibbia, la mia vera fonte della giovinezza.
Sul mio Commodore 64 girava Mystery House, ma né io né mio fratello sapevamo scrivere i comandi in inglese (neanche ora).
Poi al cinema arrivò Indy 3, e con lui il gioco, rigorosamente su floppy pirata. Amore a prima vista. E poi, sempre su floppy pirata, arrivò il gioco sui pirati: amore a prima vista, amore della mia vita, The Secret of Monkey Island.
Da lì è storia, perché la mia passione più longeva è quella per la saga e per la LucasArts in generale. Per Return to Monkey Island ho quasi pianto, e per poterci giocare ho chiesto tre giorni di ferie (a me stesso, perché ero freelance). Altro che GTA VI! Un giorno scriverò un post sulla mia passione per Monkey Island e sul documentario dedicato alla saga, che ho abbandonato perché sono cretino.
Tutte le mie passioni passano dal creare. Creare è il leitmotiv di questo spazio e della mia vita, e nella mia vita precedente avrei voluto fare lo scrittore: a oggi ho una storia di fantascienza, un romanzo su un comico che non fa ridere (arrivato prima di Joker) e tante ministorie degne di Amazing Stories di Spielberg, e un'avventura grafica, in fondo, è una storia che si gioca.
Ho SEMPRE voluto realizzare un'avventura grafica, e ho invidiato gli amici che ci sono riusciti, tra cui quelli di The Booze of Monkey Island. Anche i primi strumenti che mi hanno avvicinato al coding vengono dall'idea di fare giochi, e sono stati tutti tentativi falliti: The Games Factory, che dà una buona base delle architetture imprescindibili, Adventure Game Studio, carino, e Visionaire, che trovo uno degli engine più completi per fare avventure grafiche e su cui due anni fa ho fatto anche un corso a pagamento, tenuto da Stefano Rossitto, il creatore di The Hand of Glory 1 e 2.
Ma poi non ho cominciato mai.
Nel frattempo in azienda consolidavo la mia esperienza da product builder, e oggi, come tanti in questo periodo, sto realizzando il mio fantastico engine: GRAIL, Generative Runtime Adventurer Interaction & Logic. È la cosa più vicina a creare un'avventura grafica interamente con l'AI, e il payoff, visto che il marketing non l'ho rinnegato del tutto, è Prompt & Click.
Com'è fatto
GRAIL prende moltissimo dal meglio che ho visto negli engine precedenti, e per far girare il gioco usa Phaser, un framework in JavaScript per giochi 2D. È un'app per Mac (fatta con Electron, quindi dentro c'è un browser, ma si apre come un programma qualsiasi), e il Phaser che gira nell'anteprima mentre costruisco è lo stesso che fa girare il gioco finito.
L'editor chi ha usato Visionaire lo riconosce, ed è voluto. A sinistra c'è il menu del gioco, con le stanze, i personaggi, gli oggetti e gli enigmi, al centro la stanza su cui sto lavorando, a destra le sue impostazioni. La zona in cui il personaggio può camminare e i punti di percorso li disegno a mano sul fondale, come nel way system di Visionaire, con le coordinate del mouse che scorrono in tempo reale. La logica degli enigmi invece è fatta di condizioni e azioni (quando succede questo, se è vero quest'altro, fai questo), che è proprio la base che mi aveva dato The Games Factory.
La differenza la fa il terminale. Dentro GRAIL c'è un terminale vero, con due sessioni, una per Claude Code e una per Codex, aperte nella cartella del gioco. Non è una chat costruita apposta: sono gli stessi programmi che uso tutti i giorni, con i miei abbonamenti, quindi niente API a consumo. Da lì chiedo una stanza, un enigma o un dialogo, e gli agenti lavorano direttamente sui file del gioco, mentre i fondali li faccio disegnare a Codex.
Quello che fanno, però, nel gioco non entra da solo. Ogni loro proposta compare nell'editor tratteggiata, di un altro colore e con il nome di chi l'ha fatta, e io decido se accettarla o scartarla. Le modifiche mie e quelle degli agenti passano dallo stesso sistema, con lo stesso annulla, e ogni pezzo del gioco si ricorda chi l'ha fatto, se io, Claude o Codex, perché in un engine fatto con l'AI la prima cosa che voglio vedere è chi ha fatto cosa.
Quando il gioco è finito, esce da GRAIL come una pagina web che funziona da sola, senza Claude, senza Codex e senza niente da installare. L'AI serve a costruirlo, a giocarlo no.
Il gioco di prova, per ora, è lo studio di un detective. Dentro GRAIL ci sono anche i personaggi, che nascono tutti da un manichino di legno, e gli enigmi, che stanno in un grafo dalla partenza alla fine.