AGENT SKILL

2D 游戏开发

2d-games

2D 游戏开发原则。涵盖精灵(Sprite)、瓦片地图(tilemap)、物理和相机。

使用场景游戏开发
License 许可
MIT
最近更新
2026-11-12
Stars
★ 0
Forks
0

01 前言 Front Matter

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

02 资源文件 3

03 SKILL.md 正文

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.

04 同仓库更多 Skills

Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

Playwright Web 应用测试

webapp-testing

使用 Playwright 与本地 Web 应用交互并进行测试的工具包。支持验证前端功能、调试 UI 行为、截取浏览器截图以及查看浏览器日志。

测试工程师浏览器自动化与网页交互
★ 0
Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

Claude 网页工件构建

web-artifacts-builder

一套工具,用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建精细的、由多个组件组成的 claude.ai HTML 工件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂工件——不适用于简单的单文件 HTML/JSX 工件。

软件开发工程师前端开发与界面实现
★ 0
Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

作品主题样式设计

theme-factory

用于为作品应用主题样式的工具包。这些作品可以是幻灯片、文档、报告、HTML 落地页等。提供 10 个包含颜色/字体的预设主题,可应用于任何已创建的作品,也可即时生成新主题。

视觉设计师作品主题样式设计
★ 0
Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

Slack 动图 GIF 制作

slack-gif-creator

用于创建针对 Slack 优化的动图 GIF 的知识和工具。提供约束条件、验证工具和动画概念。当用户请求制作 Slack 用的动图 GIF 时使用,例如“给我做一个 X 做 Y 的 Slack GIF”。

多媒体工程师动图 GIF 制作
★ 0
Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

Claude 技能创建指南

skill-creator

创建有效技能的指南。当用户想要创建一个新技能(或更新现有技能),以通过专业知识、工作流或工具集成来扩展 Claude 的能力时,应使用此技能。

AI 工程师插件与技能管理
★ 0
Gabriellmaia01
Gabriellmaia01/neuro-dose-assist

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

★ 0