Esposter

Dungeons

Dungeons is Esposter's monster-catching RPG at /dungeons: walk a tile-based world, talk to NPCs, open chests, trigger random encounters in tall grass, and fight turn-based battles where you attack, use items, switch monsters, capture the enemy, or flee. It is built on Phaser through vue-phaserjs — every Phaser scene and game object is a Vue component.

Key concepts

  • Scenes are Vue componentsSceneKeyMap maps each SceneKey (Preloader, Title, World, Battle, Inventory, MonsterParty, MonsterDetails, Settings, MobileJoystick) to an async component rendered inside vue-phaserjs's <Game>. See scenes and input.
  • Generated Tiled types — maps are authored in Tiled Map Editor; pnpm tiled:gen parses the .tmx files with parse-tmx and generates enums and layer/object-property types into shared/generated/tiled/, so map content is type-checked. See world.
  • Battle state machine — a 17-state generic StateMachine drives every battle turn. See battle.
  • Data-driven content — monsters, attacks, items, NPCs, and encounter areas are constant maps in assets/dungeons/data/ and shared/assets/dungeons/data/. See monsters and items.
  • One save blob per user — a Dungeons entity (save + settings) persisted through the generic blob-state procedures (auth) or localStorage (unauth), the same pattern as clicker. See saves and settings.

Pages

  • Scenes and input — scene components, scene switching, input resolvers, mobile joystick.
  • World — Tiled pipeline, grid movement, NPCs, interactions, random encounters.
  • Battle — the state machine, damage/experience/capture math.
  • Monsters and items — content data, party management, inventory.
  • Saves and settings — persistence, the settings scene, achievements.

No open work. Decided ideas: deferred, rejected.

Shipped log

Chronological, one line per feature.

  • Single save — collapsed the unused multi-save array into one save field.
  • Attack power and defense — per-attack power, per-species defense, and a saturating damage formula, so move choice and bulk both matter.
  • Monster roster expansion — differentiated stat archetypes, 2–3 move kits per species, and level-scaled weighted encounters.
  • Milestone achievements — captures, levels, collection, and chests evaluated from the save payload on each manual save.