Depth Sorting Occlusion

Use when sprites draw in the wrong order so characters appear in front of objects they should be behind in an isometric scene.

49 stars 6 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add 0xheycat/isometric-game-skills --skill depth-sorting-occlusion
Manual install
git clone --depth 1 https://github.com/0xheycat/isometric-game-skills.git /tmp/isometric-game-skills
mkdir -p ~/.claude/skills
cp -r /tmp/isometric-game-skills/skills/depth-sorting-occlusion ~/.claude/skills/depth-sorting-occlusion

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Depth Sorting & Occlusion

## Overview

In isometric, draw order IS depth. A character is behind a tree if its anchor tile sorts earlier. This skill gives the correct sort key and handles tall/multi-tile objects that break naive sorting.

## When to Use

- Characters render in front of trees/walls they should be behind.
- Tall or multi-tile objects sort incorrectly.
- You added objects and the layering looks wrong.

## Process

1. Give every drawable a depth key based on its anchor tile: depth = row + col.
2. Sort all objects by depth ascending before drawing.
3. For ties, break by a secondary key (e.g. y, then creation order).
4. For multi-tile objects, sort by the FRONT-most occupied tile.
5. For very tall objects, consider splitting into stackable slices.
6. Re-sort only when objects move, not every frame if static.
7. Test the classic case: walk a character around all four sides of a tree.

```js
objects.sort((a, b) => (a.row + a.col) - (b.row + b.col));
```

## Rationalizations (Stop Lying to Yourself)

| Excuse | Reality |
|---|---|
| "Painter order by y is good enough" | Pure y fails for multi-tile and tall sprites. Use anchor row+col. |
| "I will sort once at load" | Moving objects must re-sort. Sort on movement. |

## Red Flags - STOP if you catch yourself:

- Sorting by raw y instead of anchor tile.
- Multi-tile objects using their center instead of front tile.
- Characters clipping through tall buildings.

## Verification
Read the full skill on GitHub

Details

Skill name
depth-sorting-occlusion
Path
skills/depth-sorting-occlusion/SKILL.md
License
MIT
Repo updated
12 August 2026

FAQ

What does the Depth Sorting Occlusion skill do?

Use when sprites draw in the wrong order so characters appear in front of objects they should be behind in an isometric scene.

How do I install the Depth Sorting Occlusion skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add 0xheycat/isometric-game-skills --skill depth-sorting-occlusion. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Depth Sorting Occlusion popular?

It lives in 0xheycat/isometric-game-skills, which has 49 GitHub stars and 6 forks, and is included in 1 curated skill list.

Related skills

Animated Sprite Generation

49

0xheycat/isometric-game-skills

Use when creating looping animated isometric sprites (water, fire, windmills, flags) as frame strips that play back smoothly in-engine.

OtherIn 1 list

Asset Pipeline Automation

49

0xheycat/isometric-game-skills

Use when automating the path from generated sprites to a shipped atlas + map so re-generating art does not mean hours of manual rework.

Productivity & NotesIn 1 list

Autotiling Transitions

49

0xheycat/isometric-game-skills

Use when making different terrain types (grass, water, sand) blend with automatic edge and corner transition tiles instead of hard seams.

OtherIn 1 list

Feeblemind

113

Hmbown/Wizards-of-the-Ghosts

In D&D, Feeblemind crushes a creature's Intelligence and Charisma to near-zero — leaving them alive but barely functional. The real-world version is deliberate capability reduction: putting a system into safe mode, stripping an overpowered tool down to basic functions, reducing attack surface by removing features. Feeblemind is not punishment — it is the recognition that sometimes a system at full capability is more dangerous than a system at reduced capability. Restricted shells, read-only modes, feature-stripped emergency interfaces.

Other11

Charm Person

113

Hmbown/Wizards-of-the-Ghosts

Charm Person is about ONE-TO-ONE interpersonal communication where warmth, honesty, and respect for autonomy are the primary constraints. It is not about persuasion tactics, conversion rates, conflict mediation, public performance, or operational coordination. The spell succeeds when the recipient feels respected even if they say no.

Other11

Forcecage

113

Hmbown/Wizards-of-the-Ghosts

Forcecage creates a pre-tested containment boundary around a subject that has not yet run. It is not about stopping, pausing, or muting something already in motion. The cage is built first, self-tested, then the subject enters. The operator watches from outside and decides whether to release.

Other11

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.