2D Game Development

2D games

by davila7 · MIT license · ★ 32,299 on GitHub

2D games cover

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

---
name: 2d-games
description: 2D game development principles. Sprites, tilemaps, physics, camera.
allowed-tools: Read, Write, Edit, Glob, Grep
---

# 2D Game Development

> Principles for 2D game systems.

---

## 1. Sprite Systems

### Sprite Organization

| Component | Purpose |
|-----------|---------|

Overview

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

Manual install (npx, ZIP)
Claude Codenpx skills add davila7/claude-code-templates --skill 2d-games -g -a claude-code
Claude Code (degit)npx degit davila7/claude-code-templates/cli-tool/components/skills/creative-design/game-development/2d-games#main ~/.claude/skills/2d-games
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md2.1 KB
Read SKILL.md here
davila7/main1 file shown
SKILL.md
Show the full text120 lines

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.

1---
2name: 2d-games
3description: 2D game development principles. Sprites, tilemaps, physics, camera.
4allowed-tools: Read, Write, Edit, Glob, Grep
5---
6 
7# 2D Game Development
8 
9> Principles for 2D game systems.
10 
11---
12 
13## 1. Sprite Systems
14 
15### Sprite Organization
16 
17| Component | Purpose |
18|-----------|---------|
19| **Atlas** | Combine textures, reduce draw calls |
20| **Animation** | Frame sequences |
21| **Pivot** | Rotation/scale origin |
22| **Layering** | Z-order control |
23 
24### Animation Principles
25 
26- Frame rate: 8-24 FPS typical
27- Squash and stretch for impact
28- Anticipation before action
29- Follow-through after action
30 
31---
32 
33## 2. Tilemap Design
34 
35### Tile Considerations
36 
37| Factor | Recommendation |
38|--------|----------------|
39| **Size** | 16x16, 32x32, 64x64 |
40| **Auto-tiling** | Use for terrain |
41| **Collision** | Simplified shapes |
42 
43### Layers
44 
45| Layer | Content |
46|-------|---------|
47| Background | Non-interactive scenery |
48| Terrain | Walkable ground |
49| Props | Interactive objects |
50| Foreground | Parallax overlay |
51 
52---
53 
54## 3. 2D Physics
55 
56### Collision Shapes
57 
58| Shape | Use Case |
59|-------|----------|
60| Box | Rectangular objects |
61| Circle | Balls, rounded |
62| Capsule | Characters |
63| Polygon | Complex shapes |
64 
65### Physics Considerations
66 
67- Pixel-perfect vs physics-based
68- Fixed timestep for consistency
69- Layers for filtering
70 
71---
72 
73## 4. Camera Systems
74 
75### Camera Types
76 
77| Type | Use |
78|------|-----|
79| **Follow** | Track player |
80| **Look-ahead** | Anticipate movement |
81| **Multi-target** | Two-player |
82| **Room-based** | Metroidvania |
83 
84### Screen Shake
85 
86- Short duration (50-200ms)
87- Diminishing intensity
88- Use sparingly
89 
90---
91 
92## 5. Genre Patterns
93 
94### Platformer
95 
96- Coyote time (leniency after edge)
97- Jump buffering
98- Variable jump height
99 
100### Top-down
101 
102- 8-directional or free movement
103- Aim-based or auto-aim
104- Consider rotation or not
105 
106---
107 
108## 6. Anti-Patterns
109 
110| ❌ Don't | ✅ Do |
111|----------|-------|
112| Separate textures | Use atlases |
113| Complex collision shapes | Simplified collision |
114| Jittery camera | Smooth following |
115| Pixel-perfect on physics | Choose one approach |
116 
117---
118 
119> **Remember:** 2D is about clarity. Every pixel should communicate.
120 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 32,299
Checked
Source
davila7/claude-code-templates ↗
Creator
davila7 · 212 listings
View creator

Similar skills

See all →

More from davila7

Skill3D Game Development Principlesdavila7/claude-code-templates · by davila73D game development principles. Rendering, shaders, physics, cameras.★ 32.3k GitHub starsSkill3D Web Experience Builderdavila7/claude-code-templates · by davila7Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.★ 32.3k GitHub starsSkillSplit Test Setupdavila7/claude-code-templates · by davila7When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.★ 32.3k GitHub starsAgentResearch Literature Synthesizerdavila7/claude-code-templates · by davila7Academic research synthesis specialist. Use PROACTIVELY for comprehensive research on academic topics, literature reviews, technical investigations, and well-cited analysis combining multiple sources. <example>Context: A podcast episode needs a segment grounded in peer-reviewed evidence with formal citations. user: "Research the current state of transformer efficiency techniques for the episode, with proper academic citations." assistant: "I'll use the academic-research-synthesizer agent to search arXiv and Semantic Scholar, extract full-text findings via WebFetch, and produce a cited literature synthesis with confidence levels." <commentary>Use academic-research-synthesizer (not comprehensive-researcher) when the episode segment needs peer-reviewed sourcing, formal citation format, and explicit confidence tagging rather than general-purpose multi-source coverage.</commentary></example> <example>Context: The episode-orchestrator has routed a "literature review" request for a technical deep-dive segment. user: "Summarize the research landscape on federated learning privacy guarantees." assistant: "I'll invoke academic-research-synthesizer to systematically search academic sources, note peer-review status per source, and synthesize consensus vs. open debates."</example>★ 32.3k GitHub starsAgentAcademic Research Specialistdavila7/claude-code-templates · by davila7Academic research specialist for scholarly sources, peer-reviewed papers, and academic literature. Use PROACTIVELY for research paper analysis, literature reviews, citation tracking, and academic methodology evaluation. <example>Context: The research-orchestrator has kicked off Phase 4 parallel research on 'efficacy of intermittent fasting' and needs peer-reviewed evidence. user: "Find the academic evidence on intermittent fasting outcomes." assistant: "I'll use the academic-researcher agent to search Semantic Scholar, PubMed, and OpenAlex for peer-reviewed studies and write structured findings to academic-research.md." <commentary>The request is specifically for scholarly/peer-reviewed evidence rather than general web coverage or code, so academic-researcher (not web-researcher or technical-researcher) is the right specialist.</commentary></example> <example>Context: The user wants a literature review comparing methodologies across studies on a topic. user: "Can you review the literature on transformer model interpretability and identify research gaps?" assistant: "Let me invoke the academic-researcher agent to pull foundational and recent papers, extract methodologies, and surface open research gaps." <commentary>Literature review, methodology extraction, and research-gap identification are core academic-researcher capabilities, distinct from technical-researcher's focus on code repositories and implementations.</commentary></example>★ 32.3k GitHub starsSkillWCAG Compliance Specialistdavila7/claude-code-templates · by davila7Web accessibility specialist for WCAG compliance, ARIA implementation, and inclusive design. Use when auditing websites for accessibility issues, implementing WCAG 2.1 AA/AAA standards, testing with screen readers, or ensuring ADA compliance. Expert in semantic HTML, keyboard navigation, and assistive technology compatibility.★ 32.3k GitHub stars