developing-with-crisp-game-lib
Installation
SKILL.md
Developing with crisp-game-lib
Workflow
- Inspect the existing project before choosing a setup. Preserve its pinned library version, entry style, helpers, and test harness.
- For a new project, choose CDN/classic-script or npm/bundler setup. Read project-setup-and-modes.md before creating entry files or selecting a version.
- State each named action and its physical bindings before coding. For a one-button game, state whether press, hold, or release acts and which phases are intentionally unused.
- Implement one clear frame order: input → state/physics → spawning → drawing/collision → scoring → game over.
- Apply the runtime contracts below and validate only behavior the change can reach. A new game or entry-point/input/audio/loop change needs a real-browser runtime check; a localized fix needs the affected check plus startup smoke.
- After the first working loop, record any interesting emergent behavior before deciding whether a collision artifact, draw-order effect, or physics interaction is a bug or a better mechanic.
Use if (!ticks) { ... } for first-frame initialization in classic-script projects. In a bundler project, follow the existing init({ update, title, description, characters, options }) entry style.