12 Commits

Author SHA1 Message Date
Matteo Benedetto f0a4647752 Title music: brano d'inseguimento veloce e complesso
Sostituisce il lamento lento (30 frame/nota, cupo) con un brano
d'azione veloce (8 frame/nota, ~7.5 note/sec):
- Melodia: arpeggi ascendenti D-F-A-D, salita cromatica verso climax,
  accordo D5 ripetuto (colpo di caccia), discesa drammatica
- Basso: ottavi pulsanti (inseguimento), pedale di D al climax
- Percussioni: kick sui downbeat + hi-hat sugli upbeat (ogni 2/4 step)
- Envelope staccato/urgente (fade down veloce)
- 128 step (era 112), loop infinito

Aggiunge note mancanti: N_D2, N_DS3, N_DS4.

Stile: il mostro ti insegue — tensione crescente, climax, arresto.
2026-06-26 12:19:38 +02:00
Matteo Benedetto d786805cab Riattiva la musica del finale (lamento in D minore, 192 step)
Ripristina gli array finale_ch1_seq[192] e finale_ch2_seq[192] e la
funzione play_finale_step completa (CH1 melodia, CH2 basso, CH4 rintocchi)
dal commit 0e2e383. La musica era stata rimossa in 5569de8 per fare
spazio alle istruzioni; ora che la ROM ha 4714 byte liberi (14%)
c'e' spazio sufficiente per reintrodurla.

Il finale suona il lamento tragico discendente A5 -> D3 -> C2 -> abisso,
in loop infinito.
2026-06-25 23:34:20 +02:00
Matteo Benedetto 5569de864c Remove finale music from ROM (archived in assets/finale_music.txt)
The 192-step D minor lament for CH1+CH2 has been extracted to an external
text file (ignored from git) for preservation. The finale now plays dramatic
silence (channels off) - the tragic tone is already conveyed by the 'YOUR
TORCH HAS RUN OUT...' text on a black screen. Frees ~2KB of ROM space
for upcoming features (e.g. instructions screen).
2026-06-25 16:02:31 +02:00
Matteo Benedetto c9bdef4094 Title music: brano complesso e ricco di pathos (112 note, 3 canali)
Riscritta completamente la title music. Ora e' un brano di 112 note
(~56 sec, in loop) su 3 canali invece del precedente semplice 32-note
su 2 canali:

- CH1 melodia: 112 note con envelope sostenuto (NR12=0x87, fade up
  lungo) per un suono haunting/cantabile. Progressione armonica ricca:
  Dm - Bb - F - C - Dm - A7(con C#, tensione) - Dm(climb al C5) -
  Gm - A7 - discesa cromatica finale nell'abisso.
- CH2 basso: linea indipendente (title_bass[112]) che segue gli accordi
  con movimento, non piu' semplice ottava sotto. Envelope deep plucked.
- CH4 noise: rintocchi sparsi (toll) ad ogni cambio d'accordo (ogni 8
  step) per atmosfera desolata stile Metroid II / Castlevania.

Struttura: intro sparso (Dm) - lamento (Bb-F-C-Dm) - tensione/climax
(A7 con leading tone, climb al C5) - crollo cromatico e discesa
nell'abisso (D3...A2).

Ispirazione: Castlevania (arpeggi gotici), Metroid II (desolazione
sparsa), Link's Awakening (melancolia onirica).
2026-06-24 20:27:42 +02:00
Matteo Benedetto 0a2757c03a Title music: lamento tragico discendente (piu pathos)
Sostituisco title_melody (32 note) con un lamento in 4 frasi da 8
note che scende da La3 fino a Mi2, con respiri (R) e salti
drammatici. Armonizza con la progressione Dm-C-Bb-A del finale,
impostando il tono sinistro del gioco fin dal menu. Le frasi:

1. Dm: A3 .. A2 (respiro)
2. C:  F3 .. A2 (caduta)
3. Bb: E3 .. A2 (sospeso, con Bb2)
4. A:  D3 .. E2 (abisso)

La nota finale E2 (Mi2) e' la piu' bassa della title music, dando
un senso di discesa definitiva. Verificato via PyBoy: entrambi i
canali (ch1 melodia + ch2 basso) attivi sul title screen.
2026-06-24 19:26:14 +02:00
Matteo Benedetto 238bef9672 Finale music: loop infinito (il brano ricomincia dopo 192 step)
Il sequencer del finale (game_over==3) ora ricomincia da capo quando
finale_music_step raggiunge 192, cosi' la musica tragica continua a
suonare finche' il giocatore non preme START. Stesso loop applicato al
sequencer inline della test ROM (test_finale.gb).

Verificato via PyBoy: NR52 mostra ch1+ch2+ch4 attivi per 6000/6000 frame
(~100s), confermando che il brano suona continuamente sia nella ROM
principale sia nella test ROM.
2026-06-24 16:48:00 +02:00
Matteo Benedetto 4d7bb13bc3 Dedicated richer, coherent tragic finale music
Replace the reused gameover music for game_over==3 with an original
192-step (24-chord) finale piece: a descending D-minor lament
(Dm-C-Bb-A7) that intensifies with high arpeggios (the 'scream'),
then plunges into the abyss as the bass descends to the lowest C and
fades to silence. Three channels: CH1 melody, CH2 bass, CH4 noise toll
(mid toll on chord changes, crash at the climax, deep toll in the abyss),
at a somber 14 frames/note.

- sound.c: finale_ch1_seq[192], finale_ch2_seq[192], play_finale_step(),
  finale_music_timer/step, sequencer branch for game_over==3.
- sound.h: play_finale_step prototype.

Verified via PyBoy: all three APU channels active throughout the finale.
2026-06-24 16:10:47 +02:00
Matteo Benedetto 0f88cea912 Finale: 'YOUR TORCH HAS RUN OUT' — tragic ending text
The finale text is now 'YOUR TORCH HAS / RUN OUT, / YOU ARE TRAPPED. /
JUST ANOTHER SCREAM / FROM THE DARK. / GAME OVER' — matching the
tragic dark theme of the game. BGP inverted for black background with
white text.
2026-06-24 14:23:47 +02:00
Matteo Benedetto 4968d2e885 8-level progression with scaling difficulty and a finale
Maze size grows +2/level from 7x7 to 21x21 (cap MAX_MAP_SIZE=21, reached
at level 8). Additional difficulty axes scale with level:
- +1 ghost per level (up to MAX_ENEMIES=8); enemy state moved to arrays,
  enemy_logic.c rewritten as a multi-entity loop (own AI, render at OAM
  2+i*2, staggered cooldowns).
- Ghost cooldown shrinks: 60 -> ~11 frames between steps.
- Stamina recharge slows: 60 -> 144 frames per point.
- Fog tightens to 3x3 (fog_radius=1) from level 7.
Fog rendering uses a dynamic 16-row centered flush (with wrap) instead of
the fixed rows 2-17 / full 32x32, so the fog stays correct on big mazes
without the multi-frame stall of the full flush.

Game ends after level 8: reaching the hatch at level 8 sets game_over=3
(finale) instead of 2. Finale screen reloads the IBM font and writes
'YOU ESCAPED / THE DARKNESS / LEVEL 8 CLEARED / PRESS START' into the BG
map; START returns to the title (new game starts at level 1).

Verified via PyBoy: sizes 7..21, fog 2->1 at L7, enemies 1..8 (distinct,
on floor, can catch the player), cooldown/recharge scaling, L1 hatch ->
game_over=2, L8 hatch -> game_over=3, finale renders + START->title->L1.
2026-06-24 13:04:39 +02:00
enne2 cc656d01cc Make next level music more audible and end smoothly descending 2026-06-23 22:18:51 +02:00
enne2 3aa20fdb60 Replace victory sequence with going deeper background and mysterious music 2026-06-23 22:01:09 +02:00
enne2 7d3003203c Refactoring: Project structure, sprite stairs & fog masks rendering fix 2026-06-23 19:43:55 +02:00