mcpField
2
2d-games

2d-games

github.com/sickn33Development49.1k53 installsUpdated today
Repository

About 2d-games

A development skill for designing 2D game systems, aimed at developers working with canvas-based games or hybrid web apps. It covers core mechanics and implementation choices from sprites and tilemaps to physics, cameras, and genre patterns.

Key features

  1. 01Sprite atlases and animation
  2. 02Tilemap layers and auto-tiling
  3. 032D collision and fixed timestep
  4. 04Camera types and screen shake
  5. 05Platformer and top-down patterns
  6. 06Canvas lifecycle cleanup

Use cases

  1. 01Plan sprite and tilemap systems
  2. 02Add platformer jump forgiveness
  3. 03Choose collision shapes for mechanics
  4. 04Prevent leftover listeners after gameplay

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/sickn33/agentic-awesome-skills --skill 2d-games

After installing, type/2d-gamesin Claude Code to confirm it loaded.

Details

From the project README

2D Game Development

Principles for 2D game systems. Pair with game-development/web-games / game-development/engine-selection for framework choice.


Shell vs guest (web)

Setup2D systems live…
Full-screen 2D gameEntire app (Phaser/Kaplay/Pixi/Canvas)
Hybrid DOM + challengesOnly inside guest viewports; tear down when done

1. Sprite Systems

ComponentPurpose
AtlasCombine textures, reduce draw calls
AnimationFrame sequences (often 8-24 FPS)
PivotRotation/scale origin
LayeringZ-order control
Animation Principles
  • Squash and stretch for impact
  • Anticipation before action
  • Follow-through after action

2. Tilemap Design

FactorRecommendation
Size16x16, 32x32, 64x64
Auto-tilingUse for terrain
CollisionSimplified shapes
LayerContent
BackgroundNon-interactive scenery
TerrainWalkable ground
PropsInteractive objects
ForegroundParallax overlay

3. 2D Physics

ShapeUse Case
BoxRectangular objects
CircleBalls, rounded
CapsuleCharacters
PolygonComplex shapes
  • Choose a movement/collision model per mechanic; pixel-art rendering can coexist with physics
  • Fixed timestep for consistency
  • Layers for filtering

4. Camera Systems

TypeUse
FollowTrack player
Look-aheadAnticipate movement
Multi-targetTwo-player
Room-basedMetroidvania
StaticBoard games, modal skill-checks
Screen Shake
  • Short duration (50-200ms)
  • Diminishing intensity
  • Use sparingly

5. Genre Patterns

Platformer
  • Coyote time (leniency after edge)
  • Jump buffering
  • Variable jump height
Top-down
  • 8-directional or free movement
  • Aim-based or auto-aim
  • Decide whether rotation matters

6. Anti-Patterns

❌ Don't✅ Do
Separate texturesUse atlases
Complex collision shapesSimplified collision
Jittery cameraSmooth following
Uncoordinated movement and physicsDefine one authority per body
Orphaned RAF/listeners after a guest closesFull teardown

Remember: 2D is about clarity. Every pixel should communicate.

When to Use

Use for canvas/Phaser/Kaplay/Pixi 2D systems, or guest viewports inside hybrid web apps.

Example

User request:

Add coyote time and jump buffering to our platformer while preserving the fixed physics timestep and testing corner collisions.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Comments

Markdown supported