Propose game-ai-behavior skill (Game Coding Complete Ch. 11-13, adapted to 2D) - #28
Merged
Conversation
…Complete Ch. 11-13) Adapts the user's AI Game Developer Specialist skill draft to this codebase: corrects claims that don't match frame's actual architecture (GUID messaging -> the type-safe generic event bus, XML templates -> YAML scene/prototype definitions, Lua -> Python for new scripts per CLAUDE.md), and fills the one section with no existing precedent here — enemy/actor AI (FSM, decision/utility scoring, pathfinding) — none of which exists in the repo yet. Complements game-architecture (engine-level patterns) rather than duplicating it.
|
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. |
Folds in the useful parts of a second, more advanced AI-skill draft (steering behaviors, sensory/perception gating, time-sliced pathfinding, AI update throttling) while keeping the codebase-grounded scoping from the first pass: flags enemy_bomber.py's existing sensory-omnipotence pattern as a concrete example, ties steering to the existing vec2 package, and adds a "Deliberately Out of Scope" section (HSM, GOAP, goal trees, navmesh/influence maps, LOD AI, fuzzy logic) explaining why those don't fit a linear 2D shooter at this scale.
Owner
Author
|
Updated this skill with a second pass: the user shared a more advanced NotebookLM-generated skill draft (HSM, GOAP/utility, steering behaviors, perception/sensory modeling, navmesh/influence maps, LOD AI, AI regulators, fuzzy logic). Rather than proposing it separately, I validated it against this repo and folded in the parts that add real value for this game:
Docs-only, same two files as before, no other changes. Generated by Claude Code |
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
Adds a new project skill,
.claude/skills/game-ai-behavior/, proposing guidance for enemy/actorAI and behavior — finite state machines, decision/utility scoring, and pathfinding — grounded in
Game Coding Complete, 4th Edition Ch. 11-13, adapted to this engine's 2D Python-scripted
actors.
Where this came from
The user supplied a draft "AI Game Developer Specialist" skill description generated from a RAG
pass over the book. Before proposing it as-is, I checked it against what this codebase actually
implements (
event/,resource/,process/,script/,games/metalslug_demo/scripts/python/,.github/workflows/) and against the already-opengame-architectureskill (#23), which coversmost of the draft's engine-architecture claims in more accurate, code-grounded detail.
Two things came out of that check:
Several claims in the draft don't match this codebase and would have misled future
contributors if shipped verbatim:
enum) with a type-safe generic bus instead (
event.Subscribe[T]/Emit, keyed byreflect.Type— seeevent/bus.go), not GUIDs.application/data/,games/*/scenes/*.yaml), not XML.Python; Lua is legacy/frozen.
resource.Managercaches by path but has no eviction policy;it grows unbounded. Flagged as a known gap rather than assumed-solved.
repo; CI (
test.yml,codeql.yml) covers the "always have a build" half of that section,nothing covers the crash-telemetry half.
the draft covers is otherwise already documented, accurately, by
game-architecture(Propose game-architecture skill (Game Coding Complete patterns) #23)— this PR doesn't re-describe it.
The one section with genuinely no precedent in this repo is AI/behavior — no FSM
framework, no decision/utility scoring, no pathfinding exists anywhere in the codebase today.
enemy_bomber.pyandenemy_walk.pyare both single hand-writtenupdate(dt)functions.That's the real gap worth a skill for, so this PR narrows the draft down to that.
What the skill covers
enemy_bomber.py's informal 2-stateifinto an explicitstate-dispatch table, sized as a plain Python dict (no new engine API).
if/elif, with a note to keep weights YAML-driven rather than hardcoded, matching thisrepo's existing data-driven conventions.
levels are AABB/Box2D platformer geometry), explicitly scoped down from the book's 3D approach.
game-architecturealreadydocuments (script globals /
object.Timer/process.Manager) instead of inventing a fourth.above, so the corrections are visible in the skill itself, not just this PR description.
references/behavior-patterns.md— full worked sketches (FSM table, utility scoring, A* gridplan) sized to this engine's actual script API surface.
Scope
Docs-only (two new files under
.claude/skills/game-ai-behavior/); no engine or game codechanged. Not stacked on any other open PR — branches from
main.Generated by Claude Code