Skip to content

Add field-notes lore codex (c2) - #11

Merged
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma
Aug 27, 2026
Merged

Add field-notes lore codex (c2)#11
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma

Conversation

@cmalpass

Copy link
Copy Markdown
Owner

What

12 persistent lore collectibles (3 per level) that glow like little parchment pages in the world. Discovering them unlocks short dino-archaeologist field notes in a new codex screen on the menu (press C or the "Field Notes · C" button). Undiscovered entries show "???" with a hint — a small nudge to keep exploring.

Details

  • src/lore.ts (new) — the 12 notes (dino-archaeologist voice, one per level × 3) + FieldNote entity with a cool parchment glow, distinct from the warm fossil glow.
  • src/level-data.tsnotes?: Point[] per level; all 12 placements validated on solid ground (unit-tested).
  • src/player.ts / src/game.ts / src/store.ts — pickup detection, collectNote (score + note SFX + persist to tinyrex_notes, survives reload), menu stats line NOTES n/12.
  • renderCodex — 4 parchment columns; found entries show title + wrapped text, undiscovered show "???" + hint.
  • Tests: 14 new (entity, content integrity, marker-on-solid-ground for all 4 levels, store round-trip + corruption guard, Game integration: collect → persist + score, no double-collect, boot load, codex toggle, codex key ignored mid-run). 239 total, all green.
  • E2E (headless Playwright): boot → empty codex → start/teleport/collect note → reload → persistence + found codex. 8/8 checks, zero page errors.

Validation

  • npm run typecheck
  • npm test — 239/239 ✓
  • npm run build — 143.56 kB / 44.28 kB gzip ✓
  • npm run lint
  • E2E screenshots: empty codex, note in world, found codex (all look right)

Part of the 10-feature enhancement program (batch C). Next: c3 — Hall of Claws (local leaderboard + mid-run personal-best burst).

12 persistent lore collectibles (3 per level) that glow like little
parchment pages in the world; discovering them unlocks short
dino-archaeologist field notes in a new codex screen on the menu
(C or the "Field Notes" button). Undiscovered entries show "???"
with a hint to keep exploration rewarding.

- src/lore.ts: NOTE content + FieldNote entity (cool glow, distinct
  from the warm fossil glow)
- level-data: notes[] per level, all placed on solid ground
- pickup loop in player, collectNote in game/store (tinyrex_notes)
- renderCodex: 4 parchment columns, found vs hint, wrapText
- stats line NOTES n/12 in menu
- 'note' SFX; tests: 14 new (placement validation for all 4 levels,
  persistence, codex toggle); 239 total
@cmalpass
cmalpass merged commit 2bf6682 into main Aug 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant