godot-2d
Skill54 starsChanged 14 days agoMITView on GitHub
2D games in Godot 4.7 - pixel-art and HD setup, TileMapLayer (cells, terrains, custom data, runtime tiles, physics chunking), Parallax2D, Camera2D (limits, smoothing, shake), y-sort and z-index, 2D lights and normal maps, AnimatedSprite2D, one-way platforms, custom drawing, many-sprite performance. Use for platformers, top-down, tile-based or any 2D scene.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- edemaistre/godot-expert-skillstheir own version, first seen Nov 29, 2026
- MindsMaster/godot-claude-code-skillstheir own version, first seen Oct 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- edemaistre/godot-expert-skills★ 8same name
- MindsMaster/godot-claude-code-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-3d-gameplaySkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-inputSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-performanceSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-shaders-vfxSkill
- godot-testing-debugSkill
- godot-uiSkill
- godot-xrSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Never mix texel sizes in pixel-art games.
- Very specific: line 23
Use one TileMapLayer node per layer (ground, walls, decoration), all sharing one TileSet resource.
- Very specific: line 34
Use one active camera per viewport (make_current()).
- Very specific: line 37
Add Parallax2D nodes anywhere, with a Sprite2D or TextureRect as child.
- Very specific: line 49
Use AnimationPlayer when frames must sync with hitboxes, sounds or method calls.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
2D in Godot 4.7
Movement physics lives in godot-physics, UI in godot-ui, shaders in godot-shaders-vfx. Look up any API with ../godot-core/scripts/api_lookup.py.
Project setup
| Style | Settings |
| Pixel art | rendering/textures/canvas_textures/default_texture_filter = 0 (Nearest); display/window/stretch/mode = "viewport", scale_mode = "integer", aspect keep/expand; base size small (for example 320×180 or 640×360); optionally rendering/2d/snap/snap_2d_transforms_to_pixel = true |
| HD 2D / UI-heavy | stretch mode canvas_items (the 4.7 default for new projects), aspect expand, base size 1920×1080 or 1280×720, Linear filter |
| Never mix texel sizes in pixel-art games. Scale sprites by whole numbers only. |
TileMapLayer (TileMap is deprecated)
- Use one
TileMapLayernode per layer (ground, walls, decoration), all sharing oneTileSetresource. OldTileMapnodes convert through the TileMap panel's toolbox: "Extract TileMap layers". - Code:
set_cell(coords, source_id, atlas_coords, alternative),erase_cell,get_cell_source_id(−1 means empty),get_cell_atlas_coords,get_used_cells(),get_used_cells_by_id(),local_to_map(to_local(global_pos)),map_to_local(cell). - Per-tile metadata: add custom data layers to the TileSet (
is_hazard: bool,cost: float), then read them withget_cell_tile_data(cell).get_custom_data("is_hazard"). - Autotiling: set up terrain sets in the TileSet, then call
set_cells_terrain_connect(cells, terrain_set, terrain)orset_cells_terrain_path. - Collision, navigation and occlusion come from the TileSet's physics, navigation and occlusion layers. Physics shapes are merged into chunks (
physics_quadrant_size, default 16). Set it to 1 only if you needget_coords_for_body_ridper cell. - For changes at runtime, set the cells, then
update_internals()if you need them immediately. Per-cell runtime variations use_use_tile_data_runtime_updateand_tile_data_runtime_updatewithnotify_runtime_tile_data_update(). - Large worlds: use chunked layers per region and free distant chunks. Thousands of
set_cellcalls in one frame stall, so spread them over several frames.
Camera2D
position_smoothing_enabledandposition_smoothing_speedsmooth the follow. Limits arelimit_left/top/right/bottom(toggle them all withlimit_enabled).drag_*_enabledadds a dead zone.- Screen shake: animate
offset(notposition) with decaying noise. See the reference. - Use one active camera per viewport (
make_current()). Zoom useszoom(Vector2: >1 zooms in).
Parallax2D (replaces ParallaxBackground/Layer)
Add Parallax2D nodes anywhere, with a Sprite2D or TextureRect as child. Set scroll_scale (0 = static, 1 = moves with the world), repeat_size = texture size for infinite tiling, repeat_times for zoomed-out cameras and autoscroll for clouds. It follows the active Camera2D automatically.
Drawing order
y_sort_enabledon the parent sorts its children by Y (top-down games). Each child's sort origin is its own origin, so put sprite feet at y=0.z_index(relative to the parent unlessz_as_relative = false) works across siblings.CanvasLayerhandles HUD and backgrounds independently of the camera.CanvasGrouprenders a subtree as one unit, which lets outline shaders and transparency apply to a whole character.
Lights and atmosphere
PointLight2D (textured) and DirectionalLight2D, plus LightOccluder2D for shadows (TileSets can carry occluders). CanvasModulate darkens the scene. Normal and specular maps go through a CanvasTexture used as the sprite texture. Light2D is per-pixel, so keep lights overlapping any given sprite in the single digits on mobile.
Sprites and animation
AnimatedSprite2D+SpriteFrameshandles frame animation (play(&"run"),animation_finished). Since 4.7, per-animation loop mode usesSpriteFrames.set_animation_loop_mode.- Use
AnimationPlayerwhen frames must sync with hitboxes, sounds or method calls. Keyframe theframeproperty of aSprite2Dwithhframes/vframes. - Sprite sheets:
Sprite2D.region_enabled+region_rect, orAtlasTexture.
Platformer specifics
- One-way platforms:
CollisionShape2D.one_way_collision = true. 4.7 addsone_way_collision_direction(defaultVector2(0, 1)). Drop through by briefly disabling the player's mask bit or raising the position. CharacterBody2Ddefaults toMOTION_MODE_GROUNDEDfor platformers. UseMOTION_MODE_FLOATINGfor top-down.- Coyote time, jump buffering and variable jump height are in the reference.
Many objects
Thousands of bullets or particles: MultiMeshInstance2D or GPU particles, or skip nodes entirely with RenderingServer canvas items and PhysicsServer2D. VisibleOnScreenEnabler2D pauses off-screen enemies. See godot-performance.
Patterns (platformer feel, top-down movement, camera shake, tile queries, custom draw), compiled by the tests: references/patterns.md
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
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.

