Skip to content
Skillpedia
General coding33k · #8690

2d-games

What it does

This skill gives your AI agent core principles for making 2D games, such as animation, level layouts, collisions and camera behavior. It is for people building side-scrolling or other 2D games.

When to use it

  • ✓When you ask the agent to design sprite animations for a 2D character.
  • ✓When you are building a level with tiles and need advice on layers.
  • ✓When you need help setting up collisions or a camera that follows the player.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/game-development/2d-games/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/game-development/2d-games/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Help me set up a camera that follows my player in my 2D platformer.”

5 new skills a week. 1 minute to read.

How it works

The skill gives the agent guidelines for each part of a 2D game. The agent uses them to make practical choices when it writes or reviews game code.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

2D Game Development

Principles for 2D game systems.


1. Sprite Systems

Sprite Organization

Component Purpose
Atlas Combine textures, reduce draw calls
Animation Frame sequences
Pivot Rotation/scale origin
Layering Z-order control

Animation Principles

  • Frame rate: 8-24 FPS typical
  • Squash and stretch for impact
  • Anticipation before action
  • Follow-through after action

2. Tilemap Design

Tile Considerations

Factor Recommendation
Size 16x16, 32x32, 64x64
Auto-tiling Use for terrain
Collision Simplified shapes

Layers

Layer Content
Background Non-interactive scenery
Terrain Walkable ground
Props Interactive objects
Foreground Parallax overlay

3. 2D Physics

Collision Shapes

Shape Use Case
Box Rectangular objects
Circle Balls, rounded
Capsule Characters
Polygon Complex shapes

Physics Considerations

  • Pixel-perfect vs physics-based
  • Fixed timestep for consistency
  • Layers for filtering

4. Camera Systems

Camera Types

Type Use
Follow Track player
Look-ahead Anticipate movement
Multi-target Two-player
Room-based Metroidvania

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
  • Consider rotation or not

6. Anti-Patterns

❌ Don't ✅ Do
Separate textures Use atlases
Complex collision shapes Simplified collision
Jittery camera Smooth following
Pixel-perfect on physics Choose one approach

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

FAQ

Does this skill write a whole game for me?

No, it gives guidance on principles, and the agent still writes the code for your project.

Which game engine does it use?

The skill focuses on general 2D principles, so tell the agent which engine or tool you use.

What does it say about animation?

It covers frame rate, squash and stretch, and anticipation and follow-through for smoother motion.

Details

Original description by the author

2D game development principles. Sprites, tilemaps, physics, camera.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8690
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills