Diario di sviluppoDevelopment journal
Gli appunti dei miei esperimenti, in ordine dal più recente. Onestà al 100%: cosa ha funzionato, cosa è crollato, cosa ho imparato. In questo periodo il diario è quasi tutto su FIDATI., il gioco che sto riscrivendo sulle macchine dell'epoca, ma il posto è questo, e i prossimi esperimenti li racconterò qui. Premessa d'obbligo: a tutto questo ci lavoro a tempo perso, la sera tardi, quando i bambini sono a letto. Il ritmo è quello che è.
Notes on my experiments, newest first. 100% honest: what worked, what collapsed, what I learned. These days the journal is almost all about FIDATI., the game I'm rewriting on period machines, but this is the place, and I'll write the next experiments here too. Fair warning: I work on all of this in my spare time, late at night, once the kids are in bed. The pace is what it is.
C64: la campagna V2 arriva anche sul biscottoneC64: the V2 campaign lands on the breadbin too
Quello che ho costruito sul Mega Drive comincia a scendere sul Commodore 64. La versione C64 v0.0.11 è la conversione della campagna V2: per ora i primi due livelli, con la pistola, i nemici e le stelle da raccogliere, riscritti in assembly 6502. Stesso gioco, stessa idea, un'altra macchina, e mezzo secolo di potenza di calcolo in meno.
What I built on the Mega Drive is starting to come down to the Commodore 64. The C64 v0.0.11 build is the conversion of the V2 campaign: the first two levels for now, with the gun, the enemies and the stars to collect, rewritten in 6502 assembly. Same game, same idea, another machine, and half a century less computing power.
1-2 «Ritmo e Piombo» sul C64: la stessa scena vista sul Mega Drive, con la pistola in pugno e la promessa in cima: «loro non sparano. Per ora.»
1-2 "Rhythm and Lead" on the C64: the same scene as on the Mega Drive, gun in hand and the promise up top: "they don't shoot. For now."
Il PRG aggiornato è qui sotto, per emulatore e hardware reale.
The updated PRG is below, for emulators and real hardware.
Scarica il PRG v0.0.11
Download PRG v0.0.11
Mega Drive: la campagna V2, dalla 0.0.2 alla 0.0.11Mega Drive: the V2 campaign, from 0.0.2 to 0.0.11
In poche build il test Mega Drive è cresciuto parecchio: da un livello di prova a una piccola campagna, la «V2». I sei schemi sono stati rimessi a nuovo, è comparso qualche avversario, c'è una presentazione tutta nuova e un bel lavoro di rifinitura grafica. La logica di gioco resta fedele all'originale. Il resto, meglio scoprirlo giocando.
In a few builds the Mega Drive test grew quite a bit: from a test level to a small campaign, "V2". The six screens have been reworked, a few adversaries appeared, there's a whole new presentation and a good deal of graphic polish. The game logic stays faithful to the original. The rest is better discovered by playing.
L'idea, in fondo, è un esperimento di design: sto provando a buttare dentro un po' tutti gli ingredienti classici del platform, quelli che si sono visti mille volte nel genere, e vedere come si mescolano tra loro. Non per inventare la ruota, ma per capire cosa succede a impastarli tutti nello stesso gioco.
The idea, really, is a design experiment: I'm trying to throw in a bit of every classic platformer ingredient, the ones the genre has shown a thousand times, and see how they blend together. Not to reinvent the wheel, but to find out what happens when you knead them all into the same game.
1-2 «Ritmo e Piombo», un mondo di pietra al crepuscolo, con la pistola in pugno, qualche robot e un pianeta all'orizzonte. 2-2 «Una di loro mente», un mondo d'acciaio nella notte, fra luna, droni e piattaforme che si accendono.
1-2 "Rhythm and Lead", a stone world at dusk, gun in hand, a few robots and a planet on the horizon. 2-2 "One of them lies", a steel world at night, among moon, drones and platforms that light up.
Gameplay. Tutti e sei gli schemi sono stati rifatti in una piccola campagna a schermata fissa: si raccolgono delle stelle per sbloccare la bandiera, e c'è più sviluppo in verticale. È arrivata una pistola, che una volta presa resta per tutta la partita, e con lei i primi nemici, da abbattere o da schivare. Ci sono le vite e il game over, ma la prima bandiera bugiarda non ne costa una: quella è la lezione gratis. Tornano i codici per accedere ai mondi, le schede di presentazione di ogni mondo e le solite frasi ironiche sparse un po' ovunque.
Gameplay. All six screens have been redone into a small fixed-screen campaign: you collect stars to unlock the flag, and there's more vertical layout. A gun showed up, and once picked up it stays for the whole run, and with it the first enemies, to shoot down or dodge. There are lives and a game over, but the first lying flag doesn't cost one: that's the free lesson. World access codes are back, along with intro cards for each world and the usual wry lines scattered here and there.
Presentazione. Un breve filmato d'apertura muto, che si può saltare, apre la partita; poi una schermata iniziale grafica, col logo grande e la scelta della lingua.
Presentation. A short silent opening cutscene, which can be skipped, opens the game; then a graphic title screen, with a big logo and a language choice.
Grafica e animazioni. Ora ogni mondo ha il suo carattere: uno di pietra, caldo, contro uno di metallo, freddo e illuminato, ciascuno con fondali, cielo, pianeti e stelle diversi. Gli spuntoni sono più grossi e riconoscibili, i blocchi finti crollano con un po' di teatro, le luci si accendono in modo morbido, e le animazioni del personaggio, delle stelle e della bandiera sono più curate. Anche l'omino e la pistola sono stati ridisegnati.
Graphics and animation. Each world now has its own character: a warm stone one against a cold, lit metal one, each with different backdrops, sky, planets and stars. The spikes are bigger and clearer, the fake blocks crumble with a bit of drama, the lights come on softly, and the animations of the character, the stars and the flag are more polished. The figure and the gun were redrawn too.
Audio. Qualche effetto sonoro nuovo per gli spari e le raccolte; la musica resta quella di prima. E come sempre, la versione C64 continua a girare intatta a fianco.
Audio. A few new sound effects for shots and pickups; the music stays as it was. And as always, the C64 version keeps running intact alongside.
Sotto, la ROM aggiornata: gira su emulatore e flashcart.
Below, the updated ROM: it runs on emulators and flashcarts.
Scarica la ROM v0.0.11
Download ROM v0.0.11
Cambio di rotta: il prototipo si sposta sul Mega DriveChange of course: the prototype moves to the Mega Drive
Il prototipo HTML ha fatto esattamente il lavoro per cui l'avevo tirato su: fissare le regole del gioco. Fisica, feel del salto, i tradimenti dei mondi, il ritmo. Tutto deciso lì, dove provare un'idea costa dieci minuti. Adesso però lo archivio: resta online, giocabile com'è, ma smetto di farlo crescere. Ha finito il suo turno, e l'ha fatto bene.
Il motivo è una sorpresa: sul Mega Drive mi trovo bene, molto più di quanto pensassi. Il 68000 con il C mi dà abbastanza agio da poterci prototipare direttamente, senza più il giro dal web. E c'è un regalo in più: sul Mega Drive posso fare due versioni dello stesso gioco. Una a schermata fissa, alla vecchia maniera, un quadro alla volta; e più avanti una in scrolling, col mondo che scorre. Due modi di raccontare lo stesso design.
Quindi si riparte da lì, direttamente sul ferro del 1988: due livelli belli corposi, costruiti come si deve, non più bozze. Poi, da quella base solida, il porting sul C64. Il web ci ha portato fin qui; il resto del viaggio lo faccio sulle macchine vere.
The HTML prototype did exactly the job I built it for: locking down the rules of the game. Physics, jump feel, the worlds' betrayals, the rhythm. All decided there, where trying an idea costs ten minutes. Now I'm shelving it: it stays online, playable as it is, but I'll stop growing it. Its turn is over, and it served me well.
The reason is a surprise: I feel at home on the Mega Drive, far more than I expected. The 68000 with C gives me enough room to prototype directly there, no more detour through the web. And there's a bonus: on the Mega Drive I can make two versions of the same game. One on a fixed screen, the old way, one board at a time; and later one with scrolling, the world sliding by. Two ways to tell the same design.
So I'm starting over right there, on 1988 iron: two good, meaty levels, built properly, no longer drafts. Then, from that solid base, the port to the C64. The web brought us this far; the rest of the journey I'll make on the real machines.
Bug e pezzi di codice: il dietro le quinteBugs and pieces of code: behind the scenes
Ho raccolto in una pagina dedicata i bug più istruttivi del porting, ognuno col suo frammento di codice e la sua morale. Tre dal C64: il gracchio del SID (il pop era negli attacchi, non nelle note), il registro che cancellava gli indizi del 6502, e la memoria che traboccava in silenzio dentro il charset. Tre dal Mega Drive: lo schermo viola dello Z80 tenuto in reset, la striscia che non voleva crollare sulla grafica a tile, e il doppio bersaglio, il trucco che permette di collaudare la console senza la console. Ogni pezzo è raccontato in parole semplici.
I've collected the most instructive porting bugs on a dedicated page, each with its code fragment and its moral. Three from the C64: the SID crackle (the pop was in the attacks, not the notes), the 6502's register that erased the clues, and the memory silently overflowing into the charset. Three from the Mega Drive: the purple screen of a Z80 held in reset, the stripe that wouldn't crumble on tile graphics, and the dual target, the trick that lets you test the console without the console. Every snippet is told in plain words.
Mega Drive: il primo livello gira, e la ROM è quiMega Drive: the first level runs, and the ROM is here
Non doveva toccare a lui, ma il prototipo era lì che aspettava. La prima ROM Mega Drive è scaricabile: il primo livello del Mondo 1 in un file .gen da 256KB che parte negli emulatori e dovrebbe partire su flashcart. Dentro c'è la ricetta raccontata nel post del 9 luglio: startup, vettori e schermata del titolo in assembly 68k, logica di gioco e render in C compilato per il 68000. La logica è la stessa del prototipo, quindi il gameplay è quello giusto; quello che non posso verificare da qui è il ferro vero. Se avete un Mega Drive e una flashcart, il collaudo su hardware è vostro: scrivetemi cosa succede. Ora si torna al C64, che era rimasto col joystick in mano.
It wasn't supposed to be its turn, but the prototype was sitting right there. The first Mega Drive ROM is downloadable: World 1's first level in a 256KB .gen file that boots in emulators and should boot on flashcarts. Inside is the recipe from the July 9 post: startup, vectors and title screen in 68k assembly, game logic and rendering in C compiled for the 68000. The logic is the same as the prototype, so the gameplay is right; what I can't verify from here is real iron. If you own a Mega Drive and a flashcart, the hardware test is yours: write me what happens. Now back to the C64, which was left holding the joystick.
Il SID ha smesso di prendermi a schiaffi: la musica c'èThe SID stopped slapping me around: the music is in
Due giorni fa scrivevo che il SID mi stava prendendo a schiaffi. Aggiornamento: abbiamo fatto pace. Il player adesso gira dentro l'interrupt del raster senza sforare il frame, e la musica è nel PRG: tema del titolo e motivo di gioco, due voci per la melodia e il basso, la terza che resta libera per gli effetti, che hanno la precedenza (in un gioco dove il pavimento crolla, il crollo si deve sentire). Non è ancora roba da demoscene, gli inviluppi sono semplici e il filtro lo sto solo sfiorando, ma è musica vera che esce da un SID vero. La prima volta che il tema è partito intero, alle 23:50, ho alzato il volume di un pelo. Poi mi sono ricordato dei bambini e l'ho riabbassato. Il viaggio nell'assembler paga la prima cartolina. Il bug più bello di questa battaglia, il gracchio fantasma, è raccontato col codice nel dietro le quinte.
Two days ago I wrote the SID was slapping me around. Update: we made peace. The player now runs inside the raster interrupt without blowing the frame budget, and the music is in the PRG: title theme and in-game tune, two voices for melody and bass, the third kept free for sound effects, which take priority (in a game where floors collapse, you need to hear the collapse). It's not demoscene material yet, the envelopes are simple and I'm barely touching the filter, but it's real music coming out of a real SID. The first time the theme played all the way through, at 11:50pm, I turned the volume up a notch. Then I remembered the kids and turned it back down. The assembler journey sends its first postcard. The best bug from this battle, the phantom crackle, is told with code in the behind the scenes.
Build 1: 2 livelli, 6 schemi, un PRG da scaricareBuild 1: 2 levels, 6 screens, a PRG to download
La prima build scaricabile del test C64 è online: i primi 2 livelli del Mondo 1, 6 schemi in totale, in un PRG da 17KB che parte su VICE e dovrebbe partire su hardware reale. «Dovrebbe» è la parola chiave: la collisione sui pavimenti finti va verificata schema per schema, e il timing del tremolio (un decimo di secondo, che su PAL fa 5 frame) per ora è tarato a occhio in emulazione, non su un C64 vero. Se lo provate su ferro vero e succede qualcosa di strano, scrivetemi: fa parte dell'esperimento. Anzi, l'esperimento è esattamente questo. La build è stata compilata alle 23:40, come tutto in questo progetto: si lavora quando i bambini dormono.
The first downloadable build of the C64 test is online: the first 2 levels of World 1, 6 screens in total, in a 17KB PRG that boots in VICE and should boot on real hardware. "Should" is the key word: fake-floor collision needs checking screen by screen, and the trembling timing (a tenth of a second, which is 5 frames on PAL) is currently tuned by eye in emulation, not on a real C64. If you run it on real iron and something weird happens, write me: it's part of the experiment. Actually, that IS the experiment. The build was compiled at 11:40pm, like everything in this project: work happens when the kids are asleep.
Il SID è tosto (e mi sta prendendo a schiaffi)The SID is tough (and it's slapping me around)
Confessione: la musica è la parte più difficile di tutto il test C64. Il SID non è un beeper, è un sintetizzatore vero: 3 voci, inviluppi ADSR, filtri analogici, e zero pietà per chi arriva dal WebAudio, dove una nota è una riga di JavaScript. Qui una nota è un registro di frequenza a 16 bit da calcolare, un inviluppo da programmare, e un player da scrivere in assembly dentro l'interrupt del raster senza sforare il tempo del frame. Per ora la build ha solo gli effetti: salto, morte, bandiera. La musica arriverà, ma con i suoi tempi: fare bene il SID è un mestiere a parte, e io sono ancora apprendista. Con l'aggravante del setup: un'ora scarsa a notte, a bambini addormentati, col volume al minimo per non svegliarli. Imparare un sintetizzatore in punta di piedi.
Confession: music is the hardest part of the whole C64 test. The SID is not a beeper, it's a real synthesizer: 3 voices, ADSR envelopes, analog filters, and zero mercy for someone coming from WebAudio, where a note is one line of JavaScript. Here a note is a 16-bit frequency register to compute, an envelope to program, and a player to write in assembly inside the raster interrupt without blowing the frame budget. For now the build has sound effects only: jump, death, flag. Music will come, at its own pace: doing the SID justice is a craft of its own, and I'm still an apprentice. With an aggravating factor, the setup: barely an hour a night, kids asleep, volume near zero so I don't wake them. Learning a synthesizer on tiptoe.
Tutti e 10 i mondi esistono. Ora il lavoro vero: affinarliAll 10 worlds exist. Now the real work: polishing them
Traguardo: tutti e 10 i mondi di FIDATI. sono giocabili da capo a fondo, Inferno compreso, lava che sale inclusa. Ma «giocabile» e «finito» sono due parole diverse. È tutto ancora una bozza: anche i primi 6 andranno ripassati, e gli ultimi 4 sono i più acerbi: la Giungla ha piattaforme coi denti che mordono con troppo poco preavviso, i teletrasporti della Città Futuristica a volte mentono troppo perfino per gli standard di questo gioco, la segnaletica della Città Aliena deve mentire con più eleganza, e l'Inferno va bilanciato schema per schema perché tutte le bugie insieme sono tante anche per chi le ha scritte. I mondi si rifiniscono uno alla volta, via via che passano il playtest. Che, per un progetto fatto di ritagli di sera dopo l'ora dei bambini, non è un brutto punto in cui stare.
Milestone: all 10 FIDATI. worlds are playable start to finish, Inferno included, rising lava included. But "playable" and "done" are two different words. It is all still a draft: even the first 6 will need another pass, and the last 4 are the roughest: the Jungle has toothed platforms that bite with too little warning, the Futuristic City teleporters sometimes lie too much even by this game's standards, the Alien City signage needs to lie with more elegance, and Inferno needs balancing screen by screen, because every lie at once is a lot even for the person who wrote them. The worlds get polished one at a time, as they survive playtesting. Which, for a project made of evening scraps after the kids' bedtime, is not a bad place to be.
Saturno: anelli che non reggono il tuo pesoSaturn: rings that can't hold your weight
Le piattaforme mobili erano l'ultima grande feature del motore, e non volevo che fossero le solite. La regola in più: finché ci stai sopra, l'anello affonda, 18 pixel al secondo, e recupera quota solo quando scendi. Quando sta per cedere, il bordo lampeggia rosso. Il risultato è che gli anelli sono mezzi di trasporto, non case: chi si ferma a pensare, sprofonda. Nel terzo livello del mondo c'è il mio dettaglio preferito: un robot pattuglia tranquillo un isolotto il cui centro è un pavimento finto. Lui ci cammina sopra sereno, perché il pavimento tradisce solo te.
Moving platforms were the engine's last big feature, and I didn't want the usual ones. The extra rule: while you stand on a ring it sinks, 18 pixels per second, and only recovers when you step off. When it's about to give, the edge flashes red. Rings become transport, not real estate: hesitate and you sink. The world's third level has my favorite detail: a robot calmly patrols an island whose center is a fake floor. It walks it safely, because the floor only betrays you.
Venere aveva bisogno di cattiveriaVenus needed more cruelty
Il primo taglio di Venere era troppo gentile: vento a raffiche telegrafate e poco altro. Il playtest è stato impietoso («troppo easy»), quindi il mondo ha ricevuto la pioggia acida (gocce che si gonfiano sotto le nuvole prima di precipitare, desincronizzate per colonna) e le vespe regine: due colpi per abbatterle, e il primo le fa infuriare. Il tocco che preferisco è balistico: il vento sposta anche i tuoi proiettili. Sparare a una vespa col vento di traverso non è mira, è artiglieria.
Venus' first cut was too kind: telegraphed gusts and little else. Playtesting was merciless ("too easy"), so the world got acid rain (drops swelling under the clouds before falling, desynced per column) and queen wasps: two hits to down, and the first one makes them furious. My favorite touch is ballistic: the wind bends your bullets too. Shooting a wasp in a crosswind isn't aiming, it's artillery.
Mega Drive: assembly dove serve, C dove contaMega Drive: assembly where needed, C where it counts
La versione Mega Drive è senza SGDK né librerie, ma non è tutta assembly, ed è una scelta precisa. Lo startup e i vettori sono assembly 68k (crt0.s), la schermata del titolo è asm pura; la logica di gioco e il render sono in C (game_logic.c, main.c), compilati da gcc in codice macchina 68000 che finisce nella ROM. Perché il C? Primo: è la prassi dell'epoca 16-bit. Il 68000 è nato pensando ai compilatori, e una valanga di giochi commerciali per Mega Drive era in C con l'assembly solo nei punti caldi. Non è un ripiego moderno. Secondo: è il trucco che rende il porting verificabile. Non ho un emulatore 68000 per collaudare la logica, ma la stessa identica sorgente C compila anche nativa sul Mac, dove la faccio giocare frame per frame contro il modello di riferimento: è così che arriva la garanzia bit-exact sui 1583 frame. In assembly 68k puro potrei solo scrivere codice e sperare. Il pavimento finto che crolla l'ho visto funzionare contando i pixel viola che sparivano: 4756, 4592, 4428. La soddisfazione era tutta lì. Il metodo del doppio bersaglio, e gli altri bug del Mega Drive, sono nel dietro le quinte.
The Mega Drive build uses no SGDK, no libraries, but it's not all assembly, and that's a deliberate choice. Startup and vectors are 68k assembly (crt0.s), the title screen is pure asm; game logic and rendering are C (game_logic.c, main.c), compiled by gcc into 68000 machine code that goes into the ROM. Why C? First: it's standard 16-bit era practice. The 68000 was designed with compilers in mind, and loads of commercial Mega Drive games were C with assembly only in the hot spots. It's not a modern shortcut. Second: it's the trick that makes the port verifiable. I don't have a 68000 emulator to test the logic with, but the exact same C source also compiles natively on the Mac, where I play it frame by frame against the reference model: that's where the bit-exact guarantee across 1583 frames comes from. In pure 68k assembly I could only write code and hope. I watched the fake floor crumble by counting vanishing purple pixels: 4756, 4592, 4428. That's where the satisfaction lives. The dual-target method, and the other Mega Drive bugs, are in the behind the scenes.
Un test per C64, con sudore e 6502A C64 test, in sweat and 6502
Portare FIDATI. sul C64 è stato un bagno di umiltà. Il motore (fisica in virgola fissa, coyote time incluso, perché il feel non si negozia nemmeno nel 1982) ha funzionato quasi subito. La grafica no: scrivere charset a byte nudi senza vederli produce esattamente quello che immaginate. La svolta è arrivata costruendo una pipeline di anteprima: ogni byte di grafica viene renderizzato e guardato prima di finire nel PRG. Curiosità: la griglia di gioco 20×12 a tile da 16px combacia esattamente con lo schermo 40×24 caratteri del C64, come se il gioco fosse nato lì. Forse un po' è vero.
Porting FIDATI. to the C64 was a humbling experience. The engine (fixed-point physics, coyote time included, because feel is non-negotiable even in 1982) worked almost immediately. The graphics didn't: writing charsets as raw bytes without seeing them produces exactly what you imagine. The turning point was a preview pipeline: every byte of art gets rendered and looked at before it enters the PRG. Fun fact: the 20×12 grid of 16px tiles maps exactly onto the C64's 40×24 character screen, as if the game was born there. Maybe it partly was.
Il feel del salto: 4 dettagli invisibiliJump feel: 4 invisible details
Un platformer vive o muore sul salto, e la differenza sta in quattro dettagli che il giocatore non vede ma sente. Coyote time: puoi saltare per qualche frame dopo aver lasciato il bordo, altrimenti i salti sembrano «rubati». Jump buffer: se premi un attimo prima di atterrare, il salto parte comunque. Salto variabile: rilasci presto, salti corto. Squash & stretch: il personaggio si schiaccia all'atterraggio e si allunga allo stacco. Sono in tutte e tre le versioni di FIDATI., identici: 4-5 frame di coyote, 6-7 di buffer, dal browser al 6502.
A platformer lives or dies on its jump, and the difference is four details players never see but always feel. Coyote time: you can still jump a few frames after leaving a ledge, or jumps feel "stolen". Jump buffering: press slightly before landing and the jump still fires. Variable jump: release early, jump short. Squash & stretch: the character squashes on landing, stretches on takeoff. All three FIDATI. versions share them, identical: 4-5 coyote frames, 6-7 buffer frames, from the browser down to the 6502.
Password come nel 1991Passwords like it's 1991
FIDATI. usa codici a 4 lettere per accedere ai mondi: LUCE, CIMA, ROSS, VENT, ANEL... Non è solo nostalgia: sui portali web non c'è garanzia di salvataggio tra sessioni, e i password system degli anni '90 risolvevano esattamente questo problema. Il codice appare quando raggiungi un mondo nuovo, te lo annoti, e vali più di qualunque cloud. Il decimo codice è LAVA. Fate due più due.
FIDATI. uses 4-letter codes to access worlds: LUCE, CIMA, ROSS, VENT, ANEL... It's not just nostalgia: web portals don't guarantee saves across sessions, and 90s password systems solved exactly that. The code shows up when you reach a new world, you write it down, and you outlast any cloud. The tenth code is LAVA. Do the math.
Marte: la pistola cambia tutto (per questo si guadagna)Mars: the gun changes everything (that's why you earn it)
Con Marte sono entrate due cose pericolose: la gravità dimezzata e la pistola. La gravità è stata la parte facile: voli per dodici tile e ogni salto imparato nei primi tre mondi diventa una bugia della tua memoria muscolare, che è esattamente il punto del gioco. La pistola invece era un rischio di design: un rage platformer dove spari rischia di diventare un run and gun qualunque. La soluzione: non si trova, si guadagna, i colpi sono contati, e i robot che la sorvegliano sono immuni ai salti. Vuoi l'arma? Prima impara a schivare. È il patto più onesto di tutto il gioco, e infatti l'ho nascosto nel mondo più bugiardo. Bilanciare i robot in sessioni da un'ora a notte, con la casa che dorme, ha richiesto una settimana di sere: il tempo perso è perso, ma rende meticolosi.
Mars brought two dangerous things: half gravity and the gun. Gravity was the easy part: you float across twelve tiles and every jump you learned in the first three worlds becomes a lie your muscle memory tells you, which is exactly the point of the game. The gun was a design risk: a rage platformer where you shoot can turn into just another run and gun. The solution: it isn't found, it's earned, ammo is scarce, and the robots guarding it are immune to jumps. Want the weapon? Learn to dodge first. It's the most honest deal in the whole game, so of course I hid it in the most deceitful world. Balancing the robots in one-hour sessions a night, with the house asleep, took a week of evenings: spare time is slow, but it makes you meticulous.
Chiptune in WebAudio: la colonna sonora senza fileChiptune in WebAudio: a soundtrack with no files
Niente mp3, niente asset: tutta la musica di FIDATI. è sintetizzata in tempo reale con WebAudio. Onde quadre e triangolari per le voci, rumore filtrato per le percussioni, un sequencer di una quarantina di righe che legge pattern scritti come stringhe. Ogni mondo ha il suo tema: lo Spazio Geometrico è quasi allegro (è il tutorial, deve illuderti), Marte è in minore, l'Inferno è un basso che sale di semitono ogni battuta, come la lava. Il vantaggio pratico: il gioco resta un singolo file HTML sotto i 50KB. Quello che il WebAudio mi ha regalato in semplicità, il SID me lo sta facendo pagare con gli interessi. Ma questa è un'altra storia, più sopra nel devlog.
No mp3s, no assets: all of FIDATI.'s music is synthesized in real time with WebAudio. Square and triangle waves for the voices, filtered noise for percussion, a forty-line sequencer reading patterns written as strings. Each world has its theme: Geometric Space is almost cheerful (it's the tutorial, it has to fool you), Mars is in a minor key, Inferno is a bassline rising a semitone every bar, like the lava. The practical win: the game stays a single HTML file under 50KB. What WebAudio gave me in simplicity, the SID is now making me pay back with interest. But that's another story, further up this devlog.
Un file solo, zero asset: le fondamentaOne file, zero assets: the foundations
Regola numero uno, decisa il primo giorno: tutto il gioco in un singolo file HTML, niente asset esterni. Sprite, tile e livelli disegnati via codice sul canvas, suoni sintetizzati, livelli descritti come stringhe di caratteri dove # è un muro, ^ è uno spuntone e F è la bandiera (una delle due, almeno). Sembra masochismo, è una scelta pratica: un file solo si carica ovunque, si porta in giro, non ha dipendenze che marciscono. E ha un effetto collaterale che scoprirò solo una settimana dopo: livelli fatti di caratteri si portano su una macchina a caratteri, tipo un certo biscottone del 1982, con una naturalezza sospetta.
Rule number one, set on day one: the whole game in a single HTML file, no external assets. Sprites, tiles and levels drawn in code on the canvas, synthesized sounds, levels described as character strings where # is a wall, ^ is a spike and F is the flag (one of the two, anyway). It sounds like masochism, it's a practical choice: a single file loads anywhere, travels well, has no dependencies to rot. And it has a side effect I'd only discover a week later: levels made of characters move to a character-based machine, say a certain 1982 breadbin, with suspicious ease.
Perché FIDATI. (e perché mente)Why FIDATI. (and why it lies)
Tutto è partito da un prototipo di un weekend, o meglio: di due sere di quel weekend, dai 21:30 in poi, a bambini addormentati. Un canvas, un quadrato arancione, una fisica scritta a mano. Il primo pavimento finto è nato per sbaglio: un bug nella collisione faceva sparire un tile a caso sotto i piedi, e morire lì era stranamente divertente. Invece di correggerlo, l'ho promosso a meccanica. Da lì il concept: un platform che ti mente, ma con regole oneste. Ogni bugia è imparabile, ogni tradimento ha un preavviso, anche se di un decimo di secondo: il gioco non bara, ti illude, che è diverso. Il titolo è arrivato da solo: FIDATI., col punto. Come lo dicono i bugiardi.
It all started as a weekend prototype, or rather: two evenings of that weekend, from 9:30pm on, kids asleep. A canvas, an orange square, hand-written physics. The first fake floor was born by accident: a collision bug made a random tile vanish underfoot, and dying there was strangely fun. Instead of fixing it, I promoted it to a mechanic. From there, the concept: a platformer that lies to you, but with honest rules. Every lie can be learned, every betrayal has a warning, even if it's a tenth of a second: the game doesn't cheat, it deceives, which is different. The title arrived on its own: FIDATI. (Italian for "trust me"), with the period. The way liars say it.