Bash.tv → GitHub → itch.io

In-game alerts, rewards and status messages for browser games. A tested toast queue with kinds (info, reward, warning, error, banner), priorities that let urgent messages through, merging repeated messages into one ("+12 coins"), a limit on what's on screen, pausing with the game, achievement banners, reduced-motion versions, and a screen-reader live region; plus what deserves a notification, w...

Download skill (.zip) Files on GitHub

Game notifications

What deserves one

Show Don’t
Achievement, unlock, level up (banner) Every coin (merge them, or use a floating number at the coin: game-hud-development)
Checkpoint saved, quest updated Things the player just did and can see
Warnings: low health, connection lost, storage full Debug messages
Errors with what to do (“Couldn’t save. Free some space.”) Errors with codes only

assets/notify.js

import { createNotifications, createLiveRegion } from "./notify.js";
const notes = createNotifications({ maxVisible: 3, liveRegion: createLiveRegion() });   // live region: screen readers hear them
notes.push({ text: "Checkpoint", kind: "info" });
notes.push({ key: "coins", amount: 5, format: (n) => `+${n} coins`, kind: "reward" });  // merges while visible
notes.push({ text: "Achievement: Untouchable", kind: "banner" });
notes.push({ text: "Connection lost. Reconnecting…", kind: "error", key: "net" });      // priority: shown first
each frame: notes.update(dt); notes.draw(ctx, { x: W - 16, y: 70, width: 280, screenWidth: W, reducedMotion });
pause menu open: notes.pause(true)

Wording and timing

Tested

Node tests: merging by key, max visible with a queue, urgent messages getting through, expiry, pausing, drawing toasts and banners, the live region. Used in the UI kit demo (merging gem counts, warnings, banners).

Pitfalls

Ten “+1 coin” toasts at once, toasts covering the HUD or the player, important messages that disappear before they’re read, notifications that keep counting down while paused, and no screen-reader option for HTML games.