/godot-dev:godot-2d-renderingfrom godot-dev
Controls 2D draw order, z_index, y-sort, CanvasLayer, 2D lights/shadows, canvas shaders, Parallax2D, and pixel-perfect scaling in Godot.
Ships in godot-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Draw order in 2D is canvas layer, then z_index, then y-sort, then tree order; most "wrong
layer" bugs are one of the four. A headless run draws nothing, so the look is judged by eye; what
can be checked without a screen (shaders compile, parameter names exist, the pixel-art settings
are set, where things sit on screen) is checked by scripts/canvas_check.py.
| The situation | Read |
|---|---|
| The courier draws behind the crate it stands in front of; a spark under the courier | reference/draw-order.md |
| Top-down: walking behind a chimney and in front of its base | reference/draw-order.md → "Y-sort for a top-down street" |
| A HUD that stays put; a sky behind everything | reference/draw-order.md → "Backgrounds: CanvasLayer and Parallax2D" |
| Far buildings that scroll slower; an endless strip of clouds | reference/draw-order.md → "Backgrounds: CanvasLayer and Parallax2D" |
| Street lamps at night, shadows from chimneys, normal-mapped sprites | reference/lights-2d.md |
| "The light does nothing"; the HUD is lit by the world's lamps | reference/lights-2d.md → "Who is lit, who casts" |
| An outline round a pickup; a white flash when the courier is hit | resources/outline.gdshader, resources/hit_flash.gdshader, then reference/canvas-shaders.md |
| A shader that loads but draws wrong; a parameter that does nothing | reference/canvas-shaders.md → "Parameter names fail silently" |
| One courier flashes and they all flash | reference/canvas-shaders.md → "Shared materials" |
| Blurry or shimmering pixel art; which stretch mode; window size | reference/pixel-art.md |
| Import settings and filtering of the sprite sheets | godot-2d-sprites → reference/pixel-art-import.md |
| Tile levels, tile y-sort origins, tile occluders | godot-tilemap |
| Camera follow, zoom, limits | godot-camera |
| HUD, menus, themes, fonts | godot-ui |
| Shaders on 3D objects, renderer differences | godot-rendering-3d |
| Seeing the result in a window; screenshots of a journey | godot-play-harness |
| Step | Decides | In front |
|---|---|---|
| 1 | CanvasLayer.layer | the higher layer, whatever the Z inside |
| 2 | CanvasItem.z_index (relative to the parent unless z_as_relative is off) | the higher final Z |
| 3 | CanvasItem.y_sort_enabled on the parent, same Z only | the higher Y |
| 4 | tree order | the child over its parent, the later sibling over the earlier |
Give every CanvasLayer its own index (two on one index swap unpredictably); keep z_index
inside RenderingServer.CANVAS_ITEM_Z_MIN .. RenderingServer.CANVAS_ITEM_Z_MAX (a value past it
is refused with an error and the old Z kept); put each y-sorted node's origin at its feet.
python3 scripts/canvas_check.py shaders resources/outline.gdshader resources/hit_flash.gdshader
python3 scripts/canvas_check.py shaders game/fx/hit_flash.gdshader game/fx/outline.gdshader --uses game/actors
python3 scripts/canvas_check.py pixel-art game
python3 scripts/canvas_check.py pixel-art game --stretch canvas_items --skip texture-filter
python3 scripts/canvas_check.py --selftest
| Command | Fails on |
|---|---|
shaders SHADER... [--uses FILE|DIR] [--root DIR] | SHADER_ERROR (a shader language error, with its line), ENGINE_ERROR (any other error the load prints), NOT_CANVAS (not shader_type canvas_item), UNKNOWN_PARAM (a parameter name a script or scene sets that no checked shader declares) |
pixel-art PROJECT [--stretch viewport|canvas_items] [--skip NAME] | STRETCH_MODE, SCALE_MODE, TEXTURE_FILTER, and with canvas_items SNAP_TRANSFORMS, SNAP_VERTICES; notes for the base size, the window size and feature overrides |
shaders copies the shaders and the includes under the project into a throwaway project outside
it and loads them headless; pixel-art only reads project.godot. The last line is the verdict:
exit 0 clean, 2 a check failed (each on a FAIL line), 3 no Godot, a timeout, no sentinel or an
unreadable file, 1 a usage error or a failed selftest. Godot comes from --godot PATH or
GODOT_BIN.
The selftest catches a misspelt name, a misspelt hint, an unknown render mode, a missing include,
a sampler passed to a function, a spatial shader and five misspelt parameter names, passes the
shipped shaders, a relative include and an instance uniform, and checks the engine facts the
references state: the settings and their defaults, the out-of-range z_index, the light
defaults, misspelt parameter names staying silent (in code, in a scene, per instance), a spatial
shader on a sprite printing nothing, shared and local-to-scene materials, tweening a shader
parameter, and the screen motion and offset of a world node, a CanvasLayer node and a
Parallax2D node under a moving camera.
z_index until it works breaks the next y-sort.canvas_check.py shaders
is the check, and a parameter name is checked against the shader, not trusted.resource_local_to_scene or an instance uniform.reference/canvas-shaders.md (opens in a new tab)reference/draw-order.md (opens in a new tab)reference/lights-2d.md (opens in a new tab)reference/pixel-art.md (opens in a new tab)resources/hit_flash.gdshader (opens in a new tab)resources/outline.gdshader (opens in a new tab)scripts/canvas_check.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tipoli5890/game-studio --plugin godot-dev28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK./godot-2d-spritesSprite frames into Godot: frames.json to SpriteFrames, AnimatedSprite2D, sheet slicing, pivots, filtering and import for pixel art.