Commit Graph

13 Commits

Author SHA1 Message Date
Matteo Benedetto 7757e414a4 Aggiungi schermata crediti (SELECT nel menu titolo)
SELECT nel menu titolo mostra i crediti: titolo, autore (Matteo B.),
strumenti (GBDK 2020, SDCC SM83, PyBoy). B per tornare al titolo.
Usa il Window layer (come le istruzioni) per non corrompere il BG map.

Ricrea i file src/screens/ rimossi da make clean (death.c,
instructions.c, screens.c) e aggiunge credits.c.
2026-06-26 11:12:29 +02:00
Matteo Benedetto 36951617d9 Estrai schermate testuali in src/screens/ (un file per schermata)
Ogni schermata testuale (font IBM) ora vive in un file separato nella
sottocartella src/screens/:
- screens.h: dichiarazioni + helper (ending_puttext/putdigit)
- screens.c: implementazione degli helper condivisi
- instructions.c: schermata istruzioni (Window layer)
- death.c: schermata di sconfitta (game_over==1)
- going_deeper.c: transizione livello (game_over==2)
- finale.c: finale tragico (game_over==3, spoiler)

engine.c ora chiama show_instructions(), show_death(),
show_going_deeper(), show_finale() invece di avere il codice inline.
Il titolo resta un'immagine (title_bg.png), non testuale.
2026-06-25 22:43:50 +02:00
Matteo Benedetto d75a44c2d1 Aggiungi schermata istruzioni testuale (font IBM)
Schermata istruzioni mostrata all'inizio del livello 1, chiudibile con B,
ri-apribile in gioco con SELECT. Testo con font IBM (stesso pattern del
finale game_over==3 e della sconfitta game_over==1).

Contenuto: titolo, obiettivo (find the hatch), controlli (DPAD walk,
A jump abyss, B run), istruzioni di chiusura (press B, select help).

Per fare spazio: rimosso claimed.png (schermata di morte ora testuale
con lo stesso font, stesso pattern del finale).
2026-06-25 22:16:28 +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 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 3aa20fdb60 Replace victory sequence with going deeper background and mysterious music 2026-06-23 22:01:09 +02:00
enne2 1b0e1a057b Revert sprite-based stairs back to tile-based stairs 2026-06-23 19:57:13 +02:00
enne2 8d71a23ae9 Fix sprite artifacts on stairs by generating all metasprites with -spr8x16 2026-06-23 19:51:09 +02:00
enne2 7d3003203c Refactoring: Project structure, sprite stairs & fog masks rendering fix 2026-06-23 19:43:55 +02:00
enne2 0ceae6f98b Optimize bg.png conversion without scaling and with correct color mapping 2026-06-23 11:10:17 +02:00
enne2 c0c217f4f6 Fix game over restart logic and update README 2026-06-23 00:09:42 +02:00
enne2 20a5d8604b Initial commit of isometric Game Boy adventure prototype 2026-06-20 16:30:15 +02:00