> ## Content Index
> Fetch the complete content index at: https://devlog.bujingames.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Mirage, day 2 (27 Nov): play-test fixes, living maps and sound
- URL: https://devlog.bujingames.com/mirage-day-2-play-test-fixes-living-maps-and-sound-nov-27/
- Published: 2026-11-28T04:00:00.000Z
- Updated: 2026-12-01T19:49:11.000Z
- Description: Day two started with playing what I built on day one, and that turned up a handful of bugs that were fun to track down.
- Author: Jin
- Tags: mirage, devlog

Day two started with playing what I built on day one, and that turned up a handful of bugs that were fun to track down.

## What play-testing found

- **The skeleton that ate every heal.** With nobody selected, ally heals go to the most hurt ally in range. The Necromancer's raised dead counted as allies, but the server refuses to heal the dead and they never regenerate. So one scratched skeleton near a party soaked up every untargeted heal. Heals now skip them.
- **The curse that killed a monster that stood still.** A damage-over-time tick turns the monster on its caster, but monsters drop any target more than 8 tiles away, and Curse reaches 5\. Cast it, step back a few tiles, and the monster just stood there while the curse killed it. A curse now lifts once its caster is past the leash.
- **Casters couldn't fight anything next to them**, because any blow broke a cast. Now a hit pushes the cast back by a quarter, and the third one breaks it.
- Saving a class without changing anything reordered its starting spells (and so new characters' hotbars).
- Name labels ran together when players and pets stood side by side. They're now laid out together by importance, moving up a row until they're clear.
- Regeneration was too fast, and topping up an already-fed pet farmed loyalty.

I also replaced every browser `confirm()` with the game's own yes/no box, and quests can now show counters in the journal ("Slime Gel: 3/5"), counting either a flag or items in the bag.

## Maps that change

The main piece of work was roadmap section 12: maps that are more than tiles.

- **Map properties**: music, safe maps (no fighting), respawn points, darkness, and edge links so walking off one map lands you on the neighbour's opposite edge, pet included.
- **Tile attributes**: a painted layer, stored as a palette of distinct kinds plus a grid of indexes so saves round-trip cleanly. Block, Block NPCs, doors (with optional keys), signs, heal and damage tiles, and spawn areas that keep an NPC wandering inside them.
- **World changes from events**: events can open doors, set tiles, and spawn, show, hide or move NPCs. These change the live map, never the saved file, and reset after a set time, on restart or on demand. They can also apply to just one player, so a door can open only for you, or an NPC can appear only in your copy of the world. Monsters keep to everyone's map.

Then I built the section's "done when" scenario by hand in the editor, which is the best test the tools get. It turned up a few rough edges (a hidden attribute that didn't hide, rect mode needing a mouse move before a click would paint, signs that spoke to everyone walking past) that I fixed the same afternoon.

## Sound

Last came the audio pipeline. The design went through a revision: sounds made inside the game are rendered by a shared synthesiser, encoded to Opus with WebCodecs and wrapped in Ogg right in the browser, and saved with their editable project beside them. I also designed a set of sound tools: an effect editor and a small chiptune tracker. The synthesiser already has pink, brown and metallic noise, an organ wave, and a 32-step wave you draw yourself.

What's built so far:

- **A sound store**: uploads checked by header bytes, size limits and a quota, admin-only and audited, served with Range support, and a Sounds tab in the content editor.
- **Playback**: per-map music and ambience that crossfade, the same track carrying on through warps and edge links, short tracks looped gaplessly from a decoded buffer, and a sound panel with volume sliders and mute.

Next is sound effects and the in-game sound tools.