Commit Graph

15 Commits

Author SHA1 Message Date
Matteo Benedetto 1fecf81395 Add instructions.png asset (160x144 hint screen)
Immagine 2bpp con il testo delle istruzioni (controlli, obiettivo).
Non ancora integrata nel gioco (la ROM a 32KB e' piena). Da usare
quando si passera' a MBC5 banking (64KB) o si ottimizzera' il codice.
2026-06-25 21:55:47 +02:00
Matteo Benedetto 3b72782225 Title screen: usa bg.png (2-bit) come sfondo del menu
Sostituito title_bg.png con bg.png quantizzato a 2-bit (160x144,
palette Game Boy). La schermata del titolo ora mostra il nuovo sfondo.
2026-06-24 20:31:44 +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 f4869c5ec6 Death screen: ricarica claimed.png modificata dall'utente
L'utente ha modificato nuovamente l'immagine claimed.png (160x144).
Riquantizzata a 2-bit palette GB e ricompilata. La schermata di morte
mostra la versione aggiornata.
2026-06-24 19:19:30 +02:00
Matteo Benedetto 6d20ef6ee5 Death screen: ricarica claimed.png a risoluzione originale 160x144
L'utente ha ricaricato l'immagine claimed.png a 160x144 (versione
originale, non croppata). Riquantizzata a 2-bit palette GB e ricompilata.
La schermata di morte ora mostra l'immagine intera invece della versione
128x96 centrata. Verificato via PyBoy: ROM 32KB, schermata mostra
l'arte completa.
2026-06-24 19:01:12 +02:00
Matteo Benedetto b4f22b7100 Death screen: usa assets/claimed.png; Going Deeper ora testuale
- assets/claimed.png (160x144, 2-bit GB) usata come schermata di morte al
  posto dello schermo nero. Il tile data e' caricato con set_bkg_data
  e la mappa 20x18 con set_bkg_tiles; il GAME OVER metasprite resta
  sovrapposto sopra l'immagine.
- Going Deeper (game_over==2) ora usa una schermata testuale col font
  IBM ('GOING DEEPER / LEVEL N') invece dell'immagine next_level.png.
  Necessario per ridurre l'occupazione ROM (la ROM era >32KB con
  title_bg + next_level + claimed + maze + tutto il resto) e far
  entrare la schermata claimed. Rimosso next_level.c/.h e l'asset.
- engine.c: nuovi helper ending_putdigit per scrivere una cifra;
  game_over==2/3 entrambi usano il font IBM per le schermate di
  transizione.
- Makefile: rimosso next_level da SRCS e dal clean; aggiunto
  claimed.png/png2asset/-c claimed.c.

Verificato via PyBoy: schermata di morte mostra l'immagine claimed
(sfondo nero + carta 128x96 centrata), going deeper mostra il testo
'GOING DEEPER / LEVEL 2'.
2026-06-24 16:58:16 +02:00
Matteo Benedetto 962ec56d59 Add test_finale.gb: ROM che porta subito al finale per test rapidi
build/test_finale.gb mostra immediatamente la schermata finale (testo
tragico + musica del finale su tutti e 3 i canali) all'avvio, senza
dover completare gli 8 livelli. Premi START per uscire.

- src/test_finale_render.c: setup palette invertita, font IBM,
  scrittura del messaggio nel map_buffer, init audio + VBL +
  game_over=3/timer=0 per far partire il sequencer del finale.
- Makefile: nuovo target build/test_finale.gb (aggiunto ad all).
2026-06-24 16:35:06 +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 36e52d4d1a Implement run mechanic and level progression with top-left HUD indicator
Run (B + direction):
- player_logic.c: while holding B + direction with stamina >= 10, each tile
  takes 8 frames instead of 16 (move_progress += 2, LERP >>4 unchanged) and
  costs 10 stamina per tile. DAS_REPEAT_RUN=2 chains tiles fluidly.
- Falls back silently to normal walk when stamina < 10.

Level progression:
- New global 'level' (starts at 1). title->game resets to 1; reaching the
  hatch (victory/Going Deeper) + START increments before engine_init (new
  maze); defeat + START resets to 1.
- Top-left HUD 'L<n>' via 3 sprites (OAM 23-25) from new level.png asset
  (glyphs L, 0-9), generated by scripts/generate_level.py and converted
  with png2asset -keep_duplicate_tiles for predictable tile ordering.
- VRAM base aligned to an EVEN index (8x16 hardware ignores tile LSB) and
  placed after the stamina load claim to avoid the shared BG tile block.
- update_level_display() called every frame; hides during game over/title.

Docs: README, doc/gameplay.md and the technical report updated.
2026-06-24 11:56:19 +02:00
enne2 d8fd7460ae Fix next_level image quantization to preserve dark tones using fixed thresholds 2026-06-23 22:12:43 +02:00
enne2 cb19677f98 Fix next_level image glitch: reset camera scroll and improve image color quantization 2026-06-23 22:05:10 +02:00
enne2 3aa20fdb60 Replace victory sequence with going deeper background and mysterious music 2026-06-23 22:01:09 +02:00
enne2 f14e2645d2 Redesign stairs as a hole in the ground and allow ghost to walk over it 2026-06-23 20:17:46 +02:00
enne2 1b0e1a057b Revert sprite-based stairs back to tile-based stairs 2026-06-23 19:57:13 +02:00
enne2 7d3003203c Refactoring: Project structure, sprite stairs & fog masks rendering fix 2026-06-23 19:43:55 +02:00