2d Games

davila7/claude-code-templates/cli-tool/components/skills/creative-design/game-development/2d-games

作者 davila78da17d671b6f無授權條款32K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

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

AI 產生的概覽

關於 2D 遊戲開發原則的參考指南,涵蓋精靈、圖磚地圖、物理、攝影機與類型模式。

功能
此技能提供一份 2D 遊戲開發原則的參考文件。內容涵蓋精靈組織與動畫、圖磚尺寸、自動拼接與分層、2D 碰撞形狀與物理考量、攝影機類型與畫面震動,以及平台跳躍與俯視視角遊戲的常見類型模式。它也列出應避免的反模式。它只產出指引內容,不產出程式碼或素材。
適用情境
在規劃或檢視 2D 遊戲系統時使用,例如決定精靈圖集、圖磚地圖分層、碰撞形狀或攝影機行為。也適合用來檢查平台跳躍或俯視視角設計中的常見陷阱。
執行需求
除代理本身外無需任何工具、套件或憑證;僅為說明文件,不附帶指令碼。

2D Game Development

Principles for 2D game systems.


1. Sprite Systems

Sprite Organization

ComponentPurpose
AtlasCombine textures, reduce draw calls
AnimationFrame sequences
PivotRotation/scale origin
LayeringZ-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

FactorRecommendation
Size16x16, 32x32, 64x64
Auto-tilingUse for terrain
CollisionSimplified shapes

Layers

LayerContent
BackgroundNon-interactive scenery
TerrainWalkable ground
PropsInteractive objects
ForegroundParallax overlay

3. 2D Physics

Collision Shapes

ShapeUse Case
BoxRectangular objects
CircleBalls, rounded
CapsuleCharacters
PolygonComplex shapes

Physics Considerations

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

4. Camera Systems

Camera Types

TypeUse
FollowTrack player
Look-aheadAnticipate movement
Multi-targetTwo-player
Room-basedMetroidvania

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 texturesUse atlases
Complex collision shapesSimplified collision
Jittery cameraSmooth following
Pixel-perfect on physicsChoose one approach

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

來源與署名

來源:davila7/claude-code-templates位於cli-tool/components/skills/creative-design/game-development/2d-games提交8da17d6

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架