Skip to content

0x0funky/agent-sprite-forge / skills/codeart2d

codeart2d

Verified

Explicit-only last resort. Draws game art from code, with no image model - pixel sprites from a PixelSpec, flat vector props, UI and icons from portable SVG, rigged characters with planted feet, FX with a JS runtime, seam-proven autotiles, playable top-down layouts with collision, stylized parallax and ambient plate motion - palette-exact, with QA and review sheets. Use only when the user explicitly asks for code-drawn art, or when generate2dmedia route_media.py finds no image or video route (no-route, exit 3). Never the default - image generation (generate2dsprite, generate2dmap, video2dsprite) comes first for characters, props, maps and FX. Not for painterly, detailed or likeness art, HD-2D plates or realistic fire, smoke or water. Always disclose the result as code-drawn.

FileKindSize
SKILL.mdskill md9.7 KB
agents/openai.yamlconfig364 B
examples/dirt-path.material.jsonconfig2.0 KB
examples/hero.anim.jsonconfig2.2 KB
examples/hero.rig.svgother3.2 KB
examples/meadow-layout.jsonconfig12.9 KB
examples/palette.jsonconfig447 B
examples/parallax-gen.jsonconfig1.4 KB
examples/plate-effects.jsonconfig1.1 KB
examples/potion-icons.svgother3.2 KB
examples/slash.fx.jsonconfig2.0 KB
examples/slime.pixelspec.jsonconfig3.3 KB
examples/walker16x24.pixelspec.jsonconfig5.1 KB
examples/water-grass.material.jsonconfig1.4 KB
references/fx-language.mdmarkdown9.5 KB
references/fx-runtime-contract.mdmarkdown7.3 KB
references/layouts-and-parallax.mdmarkdown20.4 KB
references/pixelspec.mdmarkdown10.8 KB
references/rasterizers.mdmarkdown4.9 KB
references/rig-animation.mdmarkdown18.1 KB
references/runtime/fx-template.mjsscript13.0 KB
references/schemas/codeart.schema.jsonconfig52.3 KB
references/schemas/common.schema.jsonconfig12.9 KB
references/schemas/map.schema.jsonconfig134.0 KB
references/schemas/sprite.schema.jsonconfig80.7 KB
references/style-envelope.mdmarkdown5.1 KB
references/svg-profile.mdmarkdown8.4 KB
references/tiles-and-maps.mdmarkdown15.4 KB
scripts/ambient_bake.pyscript32.5 KB
scripts/autotile_build.pyscript102.7 KB
scripts/codeart_core.pyscript118.8 KB
scripts/forge_core.pyscript86.4 KB
scripts/forge_nav.pyscript95.5 KB
scripts/forge_schema.pyscript26.1 KB
scripts/fx_build.pyscript49.3 KB
scripts/fx_verify.mjsscript29.7 KB
scripts/layout_build.pyscript106.6 KB
scripts/parallax_build.pyscript46.8 KB
scripts/pixel_qa.pyscript21.7 KB
scripts/render_pixelspec.pyscript43.0 KB
scripts/rig_animate.pyscript118.1 KB
scripts/svg_render.pyscript26.3 KB

examples/meadow-layout.json

View on GitHub
{
  "schema": "codeart2d.layout_spec.v1",
  "map_id": "meadow",
  "size": [40, 25],
  "tile_size": 16,
  "seed": 7,
  "materials": {
    "grass": {
      "color": "#5aa344"
    },
    "path": {
      "color": "#c79d62"
    },
    "water": {
      "color": "#2c62ab",
      "walkable": false
    }
  },
  "base": "grass",
  "terrain": [
    {
      "id": "pond",
      "shape": "ellipse",
      "material": "water",
      "center": [31, 7],
      "radius": [3.6, 3.1],
      "wobble": 0.6
    },
    {
      "id": "green",
      "shape": "ellipse",
      "material": "path",
      "center": [19, 13.4],
      "radius": [8.6, 2.0]
    },
    {
      "id": "west-road",
      "shape": "road",
      "material": "path",
      "width": 1.7,
      "points": [[-1, 15], [4, 14.8], [8, 13.6], [11, 13.2]]
    },
    {
      "id": "east-road",
      "shape": "road",
      "material": "path",
      "width": 1.7,
      "points": [[27, 13.5], [31, 14.6], [35, 15.6], [38, 15.2], [41, 15]]
    },
    {
      "id": "lane",
      "shape": "road",
      "material": "path",
      "width": 1.5,
      "points": [[22.5, 12.5], [22.8, 9.5], [24, 6.5], [24.6, 3], [24.2, -1]]
    }
  ],
  "actor": {
    "radius": 5,
    "ySquash": 1.0
  },
  "props": {
    "tree": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [20, 26],
        "anchor_px": [10, 25],
        "palette": {
          "D": "#23502f",
          "G": "#377a3b",
          "H": "#8cc657",
          "L": "#5aa344",
          "T": "#43291a",
          "t": "#6a4a2c",
          "o": "#1a2230"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "....................",
              ".......LLLLLL.......",
              "......LLLLLLLL......",
              ".....LLLLLLLGGG.....",
              "....LHHHHLLGGGGG....",
              "...LLHHHHLGGGGGGG...",
              "...LLHHHHGGGGGGGG...",
              "...LLLLGGGGGGGGGG...",
              "..LLLLGGGGGGGGGGDD..",
              "..LLLGGGGGGGGGGDDD..",
              "..LLGGGGGGGGGGDDDD..",
              "..GGGGGGGGGGGDDDDD..",
              "..GGGGGGGGGDDDDDDD..",
              "..GGGGGGGGDDDDDDDD..",
              "...GGGGGGDDDDDDDD...",
              "....GGGGDDDDDDDD....",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              "........tttT........",
              ".......TTTTTT.......",
              "...................."
            ]
          }
        ],
        "outline": {
          "mode": "solid",
          "color": "o"
        }
      },
      "occlusion": "tall",
      "footprint": {
        "shape": "ellipse",
        "width": 7,
        "depth": 4,
        "offset": [0, -2]
      }
    },
    "pine": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [18, 30],
        "anchor_px": [9, 29],
        "palette": {
          "D": "#23502f",
          "G": "#377a3b",
          "L": "#5aa344",
          "T": "#43291a",
          "t": "#6a4a2c",
          "o": "#1a2230"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "..................",
              "........GG........",
              "........GG........",
              ".......GGGD.......",
              ".......GGGD.......",
              "......LLGGDD......",
              "......LLGGDD......",
              ".....LLLGGDDD.....",
              ".....GGGGGDDD.....",
              "....GGGGGGDDDD....",
              "......LLGGDD......",
              ".....LLLGGDDD.....",
              "....LLLLGGDDDD....",
              "....GGGGGGDDDD....",
              "...GGGGGGGDDDDD...",
              "...LLLLLGGDDDDD...",
              ".....LLLGGDDD.....",
              "....LLLLGGDDDD....",
              "....GGGGGGDDDD....",
              "...GGGGGGGDDDDD...",
              "...LLLLLGGDDDDD...",
              "..LLLLLLGGDDDDDD..",
              ".LLLLLLLGGDDDDDDD.",
              "........tT........",
              "........tT........",
              "........tT........",
              "........tT........",
              "........tT........",
              "........tT........",
              ".................."
            ]
          }
        ],
        "outline": {
          "mode": "solid",
          "color": "o"
        }
      },
      "occlusion": "tall",
      "footprint": {
        "shape": "ellipse",
        "width": 6,
        "depth": 3.5,
        "offset": [0, -1.75]
      }
    },
    "bush": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [16, 12],
        "anchor_px": [8, 11],
        "palette": {
          "D": "#23502f",
          "G": "#377a3b",
          "H": "#8cc657",
          "L": "#5aa344",
          "o": "#1a2230"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "................",
              ".......LL.......",
              ".....LLLLLL.....",
              "...LLHHLLGGGG...",
              "..LLHHHHGGGGGG..",
              ".LLLLGGGGGGGGGD.",
              ".LLGGGGGGGGGDDD.",
              ".GGGGGGGGGDDDDD.",
              "..GGGGGGDDDDDD..",
              "...GGGDDDDDDD...",
              "....DDDDDDDD....",
              "................"
            ]
          }
        ],
        "outline": {
          "mode": "solid",
          "color": "o"
        }
      },
      "occlusion": "low",
      "footprint": {
        "shape": "ellipse",
        "width": 13,
        "depth": 5,
        "offset": [0, -2.5]
      }
    },
    "rock": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [14, 10],
        "anchor_px": [7, 9],
        "palette": {
          "S": "#4b505e",
          "s": "#7e8696",
          "w": "#b7bdc9",
          "o": "#1a2230"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "..............",
              "..............",
              "..............",
              "...wwwwwsss...",
              "..wwwwssssss..",
              ".wwwsssssssSS.",
              ".wsssssssSSSS.",
              ".ssssssSSSSSS.",
              "..sssSSSSSSS..",
              ".............."
            ]
          }
        ],
        "outline": {
          "mode": "solid",
          "color": "o"
        }
      },
      "occlusion": "low",
      "footprint": {
        "shape": "ellipse",
        "width": 12,
        "depth": 5,
        "offset": [0, -2.5]
      }
    },
    "house": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [46, 42],
        "anchor_px": [23, 41],
        "palette": {
          "P": "#b9a888",
          "R": "#772531",
          "T": "#43291a",
          "d": "#6a4a2c",
          "n": "#2c62ab",
          "p": "#ece0c4",
          "r": "#b5403b",
          "o": "#1a2230"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "..............................................",
              "..............................................",
              "......................rr......................",
              ".....................rrrr.....................",
              "....................RRRRRR....................",
              "...................rrrrrrRR...................",
              ".................rrrrrrrrRRRR.................",
              "................rrrrrrrrrRRRRR................",
              "...............RRRRRRRRRRRRRRRR...............",
              "..............rrrrrrrrrrrRRRRRRR..............",
              ".............rrrrrrrrrrrrRRRRRRRR.............",
              "............rrrrrrrrrrrrrRRRRRRRRR............",
              "...........RRRRRRRRRRRRRRRRRRRRRRRR...........",
              ".........rrrrrrrrrrrrrrrrRRRRRRRRRRRR.........",
              "........rrrrrrrrrrrrrrrrrRRRRRRRRRRRRR........",
              ".......rrrrrrrrrrrrrrrrrrRRRRRRRRRRRRRR.......",
              "......RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR......",
              ".....rrrrrrrrrrrrrrrrrrrrRRRRRRRRRRRRRRRR.....",
              "....rrrrrrrrrrrrrrrrrrrrrRRRRRRRRRRRRRRRRR....",
              "...RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...",
              "..RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR..",
              "....pppppppppppppppppppppppppppppPPPPPPPPP....",
              "....pppppppppppppppppppppppppppppPPPPPPPPP....",
              "....pppppppppppppppppppppppppppppPPPPPPPPP....",
              "....pppppppppppppppppppppppppppppPPPPPPPPP....",
              "....pppppppppppppppppppppppppppppPPPPPPPPP....",
              "....ppppnnnPnnnppppppppppppppppnnnPnnnPPPP....",
              "....ppppnnnPnnnppppppppppppppppnnnPnnnPPPP....",
              "....ppppPPPPPPPppppppppppppppppPPPPPPPPPPP....",
              "....ppppnnnPnnnppppppppppppppppnnnPnnnPPPP....",
              "....ppppnnnPnnnppppdddddTTTppppnnnPnnnPPPP....",
              "....ppppnnnPnnnppppdddddTTTppppnnnPnnnPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              "....pppppppppppppppdddddTTTppppppPPPPPPPPP....",
              ".............................................."
            ]
          }
        ],
        "outline": {
          "mode": "solid",
          "color": "o"
        }
      },
      "occlusion": "tall",
      "flip": false,
      "footprint": {
        "shape": "rect",
        "width": 38,
        "depth": 16,
        "offset": [0, -8]
      },
      "interactions": [
        {
          "name": "door",
          "offset": [0, 2],
          "reach": 12
        }
      ]
    },
    "flowers": {
      "pixelspec": {
        "schema": "codeart2d.pixelspec.v1",
        "canvas": [10, 8],
        "anchor_px": [5, 8],
        "palette": {
          "f": "#f4e45a",
          "g": "#377a3b",
          "k": "#f08aa8"
        },
        "layers": [
          {
            "name": "body",
            "rows": [
              "..........",
              "..........",
              ".....k....",
              "..f..g....",
              "..g..g.f..",
              "..g.k..g..",
              "....g..g..",
              "....g....."
            ]
          }
        ]
      },
      "occlusion": "low",
      "footprint": {
        "shape": "none"
      }
    }
  },
  "objects": [
    {
      "id": "house-1",
      "prop": "house",
      "x": 216,
      "y": 186
    },
    {
      "id": "house-2",
      "prop": "house",
      "x": 312,
      "y": 186
    },
    {
      "id": "house-3",
      "prop": "house",
      "x": 408,
      "y": 186
    }
  ],
  "scatter": [
    {
      "id": "forest",
      "kinds": {
        "tree": 5,
        "pine": 3
      },
      "count": 70,
      "spacing": 20,
      "density": {
        "scale": 110,
        "octaves": 2,
        "threshold": 0.52,
        "edge_bonus": 0.35,
        "edge_distance": 72
      },
      "clearance": {
        "road": 18,
        "blocked": 14,
        "object": 10,
        "exit": 36,
        "spawn": 28
      }
    },
    {
      "id": "hedgerow",
      "kinds": {
        "bush": 3,
        "rock": 1
      },
      "count": 18,
      "spacing": 18,
      "near": {
        "road": [12, 26]
      },
      "clearance": {
        "road": 12,
        "blocked": 8,
        "object": 8,
        "exit": 30,
        "spawn": 20
      }
    },
    {
      "id": "shore",
      "kinds": {
        "rock": 2,
        "bush": 1
      },
      "count": 8,
      "spacing": 18,
      "region": [
        400,
        24,
        608,
        208
      ],
      "attempts": 1200,
      "near": {
        "blocked": [10, 26]
      },
      "clearance": {
        "road": 14,
        "blocked": 10,
        "object": 8,
        "exit": 30,
        "spawn": 20
      }
    },
    {
      "id": "flowers",
      "kinds": {
        "flowers": 1
      },
      "count": 24,
      "spacing": 14,
      "clearance": {
        "road": 6,
        "blocked": 6,
        "object": 4,
        "exit": 20,
        "spawn": 12
      }
    }
  ],
  "exits": [
    {
      "id": "exit-west",
      "edge": "west",
      "road": "west-road",
      "to": "west-field:from-meadow"
    },
    {
      "id": "exit-east",
      "edge": "east",
      "road": "east-road",
      "to": "harbor-road:from-meadow"
    },
    {
      "id": "exit-north",
      "edge": "north",
      "road": "lane",
      "to": "north-woods:from-meadow"
    }
  ],
  "spawns": [
    {
      "id": "start",
      "x": 300,
      "y": 216,
      "facing": "south"
    }
  ]
}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall