2D game development principles. Sprites, tilemaps, physics, camera.
Add this skill
npx mdskills install sickn33/2d-gamesComprehensive reference guide for 2D game development principles and best practices.
1---2name: 2d-games3description: 2D game development principles. Sprites, tilemaps, physics, camera.4allowed-tools: Read, Write, Edit, Glob, Grep5---67# 2D Game Development89> Principles for 2D game systems.1011---1213## 1. Sprite Systems1415### Sprite Organization1617| Component | Purpose |18|-----------|---------|19| **Atlas** | Combine textures, reduce draw calls |20| **Animation** | Frame sequences |21| **Pivot** | Rotation/scale origin |22| **Layering** | Z-order control |2324### Animation Principles2526- Frame rate: 8-24 FPS typical27- Squash and stretch for impact28- Anticipation before action29- Follow-through after action3031---3233## 2. Tilemap Design3435### Tile Considerations3637| Factor | Recommendation |38|--------|----------------|39| **Size** | 16x16, 32x32, 64x64 |40| **Auto-tiling** | Use for terrain |41| **Collision** | Simplified shapes |4243### Layers4445| Layer | Content |46|-------|---------|47| Background | Non-interactive scenery |48| Terrain | Walkable ground |49| Props | Interactive objects |50| Foreground | Parallax overlay |5152---5354## 3. 2D Physics5556### Collision Shapes5758| Shape | Use Case |59|-------|----------|60| Box | Rectangular objects |61| Circle | Balls, rounded |62| Capsule | Characters |63| Polygon | Complex shapes |6465### Physics Considerations6667- Pixel-perfect vs physics-based68- Fixed timestep for consistency69- Layers for filtering7071---7273## 4. Camera Systems7475### Camera Types7677| Type | Use |78|------|-----|79| **Follow** | Track player |80| **Look-ahead** | Anticipate movement |81| **Multi-target** | Two-player |82| **Room-based** | Metroidvania |8384### Screen Shake8586- Short duration (50-200ms)87- Diminishing intensity88- Use sparingly8990---9192## 5. Genre Patterns9394### Platformer9596- Coyote time (leniency after edge)97- Jump buffering98- Variable jump height99100### Top-down101102- 8-directional or free movement103- Aim-based or auto-aim104- Consider rotation or not105106---107108## 6. Anti-Patterns109110| ❌ 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 |116117---118119> **Remember:** 2D is about clarity. Every pixel should communicate.120
Full transparency — inspect the skill content before installing.