Propose game-architecture skill (Game Coding Complete patterns) - #23
Merged
Merged
Conversation
Adds a project skill documenting how this engine's existing patterns (GameObject/Component actors, Prototype cloning via spawnEntity, the event bus, resource cache) map to "Game Coding Complete, 4th Edition" (McShaffry & Graham), plus guidance on when to use the still-unwired process.Manager vs. the two per-entity timing conventions already established in games/metalslug_demo's scripts (module-level state for single-instance scripts, the Timer component for shared-script clones). Includes a decision table mapping games/metalslug_demo/ideas.md's open TODOs to the relevant pattern, and a worked CameraShake Process example as the template for the first process.Manager use case.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proposes a new project skill,
.claude/skills/game-architecture/, that documents how thisengine's existing patterns map to Game Coding Complete, 4th Edition (McShaffry & Graham) — the
book already cited in
process/process.go's own doc comment — and gives concrete guidance forimplementing the remaining
games/metalslug_demo/ideas.mdTODOs using patterns alreadyestablished in this codebase instead of ad hoc versions.
It sits alongside the existing
.claude/skills/game-dev(validation) skill and follows thestructural conventions of
.agents/skills/python-design-patterns/python-anti-patterns(frontmatter
name/description, "When to Use This Skill", numbered "Core Concepts", a "QuickStart", a tiered
references/file for deeper material, and a "Related Skills" pointer back togame-dev).What's in it
SKILL.md(~180 lines): layer boundary discipline (ADR-003), Component-composition actorpattern, Prototype spawning via
GameObject.Clone()/spawnEntity, a decision guide forwhich of three timing mechanisms to use (single-instance script globals vs. the
object.Timercomponent vs. the still-unwiredprocess.Manager), informal state-machineguidance for actor AI, resource-cache reuse, and event-driven HUD design. Ends with a table
mapping each
ideas.mdTODO to the relevant pattern — and flags that a few (enemy sprite,enemy shooting at the player, explosion animation) are already implemented, even though
ideas.mdstill shows them unchecked.references/pattern-catalog.md: a chapter-by-chapter mapping of Game Coding Completeconcepts to where (or whether) they're implemented here, a note on the current
Prototype-clone-vs-true-object-pool tradeoff, and a full worked
CameraShakeprocess.Processexample — the concrete template for the first thing that should attach to a
process.Manager.Why
process/was added standalone with no consumer yet, and several of the timing/spawningconventions in the newer Python scripts (
enemy_bomber.py,sphere_timer.py,game_manager.py) were worked out ad hoc, script by script. This skill exists so the nextgameplay feature — pickups, camera shake, a HUD, shader-based projectiles — reuses those
conventions deliberately (and picks the right one of the three timing mechanisms) instead of
re-deriving them, and so a reviewer has a concrete checklist for whether new gameplay code is
bypassing an existing pattern.
No engine or game code changes — this PR only adds two markdown files.
Generated by Claude Code