Communitygithub.com

SamuelChien/mega-skills-collection

2D 遊戲開發原則,包含精靈、地圖、物理與攝影機系統。

mega-skills-collection 是什麼?

這項技能涵蓋了 2D 遊戲開發的核心原則與系統,適合用於規劃與實作 2D 遊戲的基礎架構。內容包括:精靈系統(紋理合併、動畫與圖層管理)、圖塊地圖設計(尺寸、自動拼接與碰撞簡化)、2D 物理(碰撞形狀選擇、固定時間步長與圖層過濾)、攝影機系統(跟隨、預判、多目標與房間切換)以及常見遊戲類型的模式(平台跳躍、俯視射擊)。同時也列出了常見的反模式,例如使用分散紋理而非合併圖集、或導致畫面抖動的攝影機實作。此技能適用於任何支援 Markdown 技能定義的 AI 代理平台。開發者可參考這些原則快速建立 2D 遊戲原型,提升開發效率與視覺品質。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/2d-games

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

2D 遊戲開發

2D 遊戲系統的設計原則。


1. 精靈系統

精靈組織

元件用途
圖集合併紋理,減少繪製呼叫
動畫影格序列
樞軸旋轉/縮放原點
圖層Z 軸順序控制

動畫原則

  • 影格率:典型範圍 8-24 FPS
  • 擠壓與拉伸以強化衝擊感
  • 動作前有預備動作
  • 動作後有跟隨動作

2. 圖塊地圖設計

圖塊考量

因素建議
尺寸16x16、32x32、64x64
自動拼接適用於地形
碰撞簡化形狀

圖層

圖層內容
背景無互動的場景
地形可行走的地面
道具可互動物件
前景視差疊加

3. 2D 物理

碰撞形狀

形狀使用場景
矩形長方形物件
圓形球體、圓形物體
膠囊體角色
多邊形複雜形狀

物理考量

  • 像素完美 vs 物理引擎為基礎
  • 使用固定時間步長以保持一致性
  • 圖層用於碰撞過濾

4. 攝影機系統

攝影機類型

類型用途
跟隨追蹤玩家
預判預測移動方向
多目標雙人模式
房間切換類銀河惡魔城

畫面震動

  • 短暫持續時間(50-200ms)
  • 強度逐漸衰減
  • 節制使用

5. 遊戲類型模式

平台跳躍

  • 懸崖容錯時間(離開邊緣後的寬限期)
  • 跳躍緩衝
  • 可變跳躍高度

俯視視角

  • 八方向或自由移動
  • 瞄準式或自動瞄準
  • 考慮是否啟用旋轉

6. 反模式

❌ 避免✅ 建議
分散紋理使用圖集
複雜碰撞形狀簡化碰撞
抖動攝影機平滑跟隨
物理中追求像素完美選擇單一方案

切記: 2D 的核心在於清晰度。每一個像素都應該傳達資訊。

使用時機

當任務與上述概述的工作流程或動作明確匹配時,即可使用此技能。

限制

  • 僅在任務清楚符合上述範圍時使用此技能。
  • 請勿將輸出視為環境特定驗證、測試或專家審查的替代品。
  • 如果缺少必要的輸入、權限、安全邊界或成功標準,請暫停並要求澄清。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

3D game development principles. Rendering, shaders, physics, cameras.

SamuelChien/mega-skills-collection

Expert 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.

SamuelChien/mega-skills-collection

Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When 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," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

相關技能