2d-games
bcastelino/agent-skills-kit/skills/game-development/2d-games/SKILL.md
2D game development principles. Sprites, tilemaps, physics, camera.
Skill2 starsChanged 7 months ago
What's in it
- 2D Game Development
- 1. Sprite Systems
- Sprite Organization
- Animation Principles
- 2. Tilemap Design
- Tile Considerations
- Layers
- 3. 2D Physics
- Collision Shapes
- Physics Considerations
- 4. Camera Systems
- Camera Types
- Screen Shake
- 5. Genre Patterns
- Platformer
- Top-down
- 6. Anti-Patterns
--- name: 2d-games description: "2D game development principles. Sprites, tilemaps, physics, camera." --- # 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.
More agent context in bcastelino/agent-skills-kit
60 other files this repository gives its agents.
Skill
- ai-engineerskills/ai-engineer/SKILL.md
- clean-codeskills/clean-code/SKILL.md
- cloud-architectskills/cloud-architect/SKILL.md
- code-documentation-doc-generateskills/code-documentation-doc-generate/SKILL.md
- code-refactoring-tech-debtskills/code-refactoring-tech-debt/SKILL.md
- code-reviewerskills/code-reviewer/SKILL.md
- commitskills/commit/SKILL.md
- computer-vision-expertskills/computer-vision-expert/SKILL.md
- context-optimizationskills/context-optimization/SKILL.md
- crewaiskills/crewai/SKILL.md
- database-designskills/database-design/SKILL.md
- database-migrationskills/database-migration/SKILL.md
- database-optimizerskills/database-optimizer/SKILL.md
- databricks-community-geoskills/databricks-community-geo/SKILL.md
- data-engineerskills/data-engineer/SKILL.md
- data-scientistskills/data-scientist/SKILL.md
- embedding-strategiesskills/embedding-strategies/SKILL.md
- fastapi-proskills/fastapi-pro/SKILL.md
- 3d-gamesskills/game-development/3d-games/SKILL.md
- game-artskills/game-development/game-art/SKILL.md
- game-audioskills/game-development/game-audio/SKILL.md
- game-designskills/game-development/game-design/SKILL.md
- mobile-gamesskills/game-development/mobile-games/SKILL.md
- multiplayerskills/game-development/multiplayer/SKILL.md
- pc-gamesskills/game-development/pc-games/SKILL.md
- game-developmentskills/game-development/SKILL.md
- vr-arskills/game-development/vr-ar/SKILL.md
- web-gamesskills/game-development/web-games/SKILL.md
- gcp-cloud-runskills/gcp-cloud-run/SKILL.md
- git-advanced-workflowsskills/git-advanced-workflows/SKILL.md
- github-actions-templatesskills/github-actions-templates/SKILL.md
- github-automationskills/github-automation/SKILL.md
- github-workflow-automationskills/github-workflow-automation/SKILL.md
- hugging-face-cliskills/hugging-face-cli/SKILL.md
- hugging-face-jobsskills/hugging-face-jobs/SKILL.md
- langgraphskills/langgraph/SKILL.md
- mcp-builderskills/mcp-builder/SKILL.md
- mlops-engineerskills/mlops-engineer/SKILL.md
- ml-pipeline-workflowskills/ml-pipeline-workflow/SKILL.md
- nosql-expertskills/nosql-expert/SKILL.md
- notebooklmskills/notebooklm/SKILL.md
- pdf-officialskills/pdf-official/SKILL.md
- postgres-best-practicesskills/postgres-best-practices/SKILL.md
- postgresqlskills/postgresql/SKILL.md
- pptx-officialskills/pptx-official/SKILL.md
- prometheus-configurationskills/prometheus-configuration/SKILL.md
- python-proskills/python-pro/SKILL.md
- rag-engineerskills/rag-engineer/SKILL.md
- skill-creatorskills/skill-creator/SKILL.md
- software-architectureskills/software-architecture/SKILL.md
- spark-optimizationskills/spark-optimization/SKILL.md
- tailored-resume-generatorskills/tailored-resume-generator/SKILL.md
- temporal-python-proskills/temporal-python-pro/SKILL.md
- unit-testing-test-generateskills/unit-testing-test-generate/SKILL.md
- uv-package-managerskills/uv-package-manager/SKILL.md
- vibe-code-auditorskills/vibe-code-auditor/SKILL.md
- video-downloaderskills/video-downloader/SKILL.md
- vulnerability-scannerskills/vulnerability-scanner/SKILL.md
- youtube-summarizerskills/youtube-summarizer/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

