October 21, 2026 · In Ayotl
The house intro: a turtle, a rock and three games
Ayotl's three games now open with the same six-second scene. A dependency-free module that each game feeds with its own canvas and audio, because all three draw and sound differently inside.
The three games share the look (fat pixels, the palette of a 1977 console, chip sound) but not the code: one draws on a 320x180 canvas with its own primitives, another on a 240x160 one that then goes through an old-monitor filter, and the third was just born. A shared module had to ask for the minimum: a 2D context, a size, and, if the game has already opened audio, its AudioContext and the node to plug into.
await introAyotl({ ctx, ancho, alto, audioCtx, destino, canvas });The detail that rules everything is audio. The intro runs the moment the game starts, before any title screen, and browsers don't let anything play until the user's first gesture: on the web it plays silently until someone taps (and that tap skips it, too); in the apps, where the WebView lets audio open on load, it sounds from the first frame. The five notes of the letters (C, E, G, C, E) are played with oscillators created on the spot, on the game's effects bus, which is why they respect its volume control.
While the intro paints, the game loop has to stay quiet: each one now has an «intro» mode in which it doesn't draw (one of them only keeps copying the internal canvas to the output, so the monitor filter stays on). When it ends, each game goes back to where it was: the menu, or the title with its music. There are three copies of the file, one per repository, with a note at the top saying that if you change one you change all three. For an eighty-line file, a package would have been more ceremony than help.