Skip to content
Back to skills

Fix

ASecurity

Diagnose and fix a BLIT386 game error using the local docs.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
developmentgoawsapibackend

Works with

  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add blit386/blit386 --skill fix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/blit386-fix/badge)](https://www.skillsdirectory.com/skills/blit386-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fix
description:
  Diagnose and fix a BLIT386 game error using the local docs. Use this whenever the game crashes, shows a blank or black
  screen, throws an error in the browser console, freezes, or behaves unexpectedly, even if the user only says 'it is
  broken', 'nothing shows up', or 'why is this not working'.
---

# Fix a runtime error

Diagnose and fix a BLIT386 game error using the local docs.

## Steps

1. Open `docs/when-something-breaks.md` first. It covers the most common beginner errors with concrete fixes.
2. On a blank screen: ensure `BT.paletteSet(palette)` was called in `init()` before any draw call.
3. If you see "Cannot read properties of undefined": you likely forgot `await` before sprite or font load calls.
4. Something drawn in slot 0 is invisible: slot 0 is always transparent. Draw and clear with slot 1 or higher, and set
   that slot's color first - every other slot of a new palette starts out black.
5. Check `AGENTS.md` for correct engine API usage - getters have no `()`, methods do.
6. Post-process effects require WebGPU - confirm `BT.activeBackend` is not `'software'` (the Canvas 2D fallback does not
   run effects). Keep starters free of post-process effects.

## What to check

- `update()` is for logic only; `render()` is for drawing only. Drawing in `update()` causes visual glitches.
- If key or button taps feel randomly missed: `isKeyPressed`/`isKeyReleased`/`inputString`/`isPressed`/`isReleased` must
  be read in `update()`. Reading them in `render()` can miss the one-frame edge; see `docs/input.md`.
- All screen coordinates must be whole numbers (`Vector2i`, `Rect2i`). Fractions cause off-by-one pixel issues.
- A sprite that will not stretch into a `Rect2i`, or an error about a `Rect2i` destination: the stretch form of
  `BT.drawSprite` needs an options object as the 4th argument (`{}` is enough), with `scale` at `1` and no `pivot`
  (engine 1.8.0+). A palette fade at the wrong speed, or a slot set in `render()` that snaps back: palette effects now
  step once per `update()`, so change slots in `update()` / `init()`. Both are in `docs/when-something-breaks.md`.
- If you see `{{` or `}}` in a file, a template placeholder was not substituted - this is a scaffolding bug, not a game
  bug.
- A game frozen on one picture usually means `update()` or `render()` threw - read the console error, fix it, and save:
  hot reload starts the paused game again (engine 1.9.0+, no page reload).
- After a save that breaks `init()`, hot reload should leave the previous game running - fix the typo and save again
  (see `docs/hot-reload.md`). If every tiny edit full-reloads the page, confirm `vite.config.js` has
  `plugins: [blit386()]` and blit386 is 1.4.0+.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.