agentleFS
Ar9avAr9av/game-exa/skills/bg-artist/SKILL.md

bg-artist

Skill4 starsChanged 7 months agoMITView on GitHub

Generates a parallax background image (sky, hills, cave interior, space, etc.) for a Phaser game using GPT Image 2 (gpt-image-2). The Phaser runtime treats this as an optional layer that scrolls slower than the world, providing depth without consuming gameplay collision. Use after game-designer if the genre benefits from a scenic backdrop.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After game-designer produces a GDD.

    line 12
  2. Very specific:

    Read gdd.genre and levelHints.themes[0] from game-state.json.

    line 52
  3. Very specific:

    Update game-state.json assets.bg reference.

    line 58
  4. Distinctive:

    Always 8-bit pixel art style, chunky pixels, no anti-aliasing.

    line 62
  5. Distinctive:

    No characters, no foreground objects, no text, no UI, no borders.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Background Artist

Generates a single PNG that the Phaser runtime renders behind the tilemap with a scrollFactor < 1 for parallax. Pure deterministic helper plus one GPT Image 2 call.

When to use

After game-designer produces a GDD. Whenever the genre + theme benefit from a backdrop:

  • platformer / action-platformer / dungeon-crawler / shoot-em-up: yes (sky, cave, space)
  • beat-em-up: yes — layered street/park/forest background is essential for visual quality
  • top-down-adventure: usually no (the tilemap fills the view)
  • puzzle / abstract: optional

The orchestrator decides; the skill exposes the deterministic call.

Output

  • public/assets/bg.png — single image, no transparency
  • Manifest field merged into public/assets/manifest.json:
{
  "bg": {
    "relPath":      "assets/bg.png",
    "scrollFactor": 0.3                       // 0 = locked to camera, 1 = locked to world; ~0.2-0.4 = subtle parallax
  }
}

The Phaser template's Preload scene loads bg automatically when this manifest field is present. Game.js adds it as add.image(...).setDepth(-100) and applies the scrollFactor.

Default themes

GenreThemePrompt skeleton
platformer / action-platformeroutdoor-daySoft pastel sky, fluffy clouds, distant green rolling hills silhouetted in 3 depth layers
platformer / action-platformeroutdoor-nightDeep blue night sky, large full moon, mountain range silhouetted in 2 layers, scattered stars
action-platformerdungeonDark damp stone dungeon interior, crumbling brick walls receding into shadows, faint torch glow on side walls, no characters
dungeon-crawlercaveRough cave walls with stalactites, faint bioluminescent moss patches, distant dark tunnel, atmospheric blue-green tint
shoot-em-upspaceDeep blue-black space, star field with 3 brightness levels, 1-2 colourful distant nebulae, no planets in foreground
beat-em-upforest-park3 depth layers: far = muted blue-grey sky + canopy silhouettes; mid = orange-brown tree trunks + fence; near = dirt ground strip. NES Double Dragon color palette. No characters or UI.
beat-em-upcity-streetFar = dark grey building facades with lit windows; mid = parked cars / dumpsters silhouetted; near = sidewalk strip. Urban night palette.
beat-em-upwarehouseIndustrial brick walls with high windows; dim overhead light pools; stacked crates silhouetted in mid distance.
top-down-adventure(none — uses tilemap fill)n/a

Process

  1. Read gdd.genre and levelHints.themes[0] from game-state.json.
  2. Pick a prompt template (above) and fill in the theme.
  3. POST to GPT Image 2 with quality: low, dimensions ~1280×768 (16:10, well within FAL/OpenAI constraints).
  4. Downscale to ~480×288 with sharp using kernel: 'nearest' to preserve pixel-art crispness.
  5. Save to public/assets/bg.png.
  6. Merge bg field into manifest.json.
  7. Update game-state.json assets.bg reference.

Hard rules for prompts

  • Always 8-bit pixel art style, chunky pixels, no anti-aliasing.
  • No characters, no foreground objects, no text, no UI, no borders. The bg is a backdrop only.
  • Vivid clean colors that complement the player sprite without competing.
  • Aspect ratio close to 16:10 or 16:9; avoids the 3:1 cap.

Scripts

  • scripts/generate_bg.mjs <project-dir> [--theme outdoor-day|outdoor-night|cave|space] [--quality low|medium|high]

References

  • references/themes.md — full per-theme prompt templates
  • ../sprite-artist/references/gpt-image-2.md — endpoint/auth/constraints (shared with sprite-artist)

Why parallax instead of a static fill

A scrollFactor: 0 background is fine but feels "stuck on" to the camera. 0.2-0.4 makes the world feel deeper as the camera moves — clouds appear to drift relative to terrain — for free. The trade-off: with very large levels the bg image has to tile or stretch; we stretch via setDisplaySize(worldW, worldH) which works well for short levels and acceptably for longer ones.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.