Skip to content

Consolidate the core engine into a frameengine/ package - #27

Merged
diego3 merged 1 commit into
claude/split-worldscene-from-metalslugfrom
claude/consolidate-frameengine-package
Jul 30, 2026
Merged

Consolidate the core engine into a frameengine/ package#27
diego3 merged 1 commit into
claude/split-worldscene-from-metalslugfrom
claude/consolidate-frameengine-package

Conversation

@diego3

@diego3 diego3 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Physically consolidates every package this repo's docs/frame_engine_migration_plan.md
classified as Move into a single new top-level frameengine/ directory, so that extracting
diego3/frame-engine later is a straight copy instead of
another round of figuring out what goes where.

Stacked on #26 (the WorldScene/MainMenu split) — that had to land first, since this move
needs to carry the generic scene.WorldScene, not the old game-logic-leaking MainMenu. Marked
draft until #26 merges, to keep the diff here scoped to just the move. Base is
claude/split-worldscene-from-metalslug, not main.

What moved

Every directory the plan's inventory marked Move, with its internal layout preserved exactly
as-is — this directory's structure is the plan's proposed frame-engine repo layout:

frameengine/
├── application/{config,engine,game,data}/
├── event/, events/
├── object/
├── physics/{,box2d}/
├── ports/
├── process/
├── resource/
├── script/
├── vec2/
└── view/{ui,input,camera,scene}/

games/, logic/, main.go, main_wasm.go, and docs/ all stay where they are — per the
plan's inventory, they're the application-layer side of the eventual split, not the engine.

What this is (and isn't)

Pure move + import-path rewrite (goengine/xgoengine/frameengine/x) within the same Go
module — no behavior change anywhere. The only files modified in place (not moved) are the three
outside frameengine/ that import it: main.go, main_wasm.go, and
games/metalslug_demo/scene.go.

When frame-engine is ready to actually receive this code, the extraction becomes: copy
frameengine/'s contents to the new repo's root, go mod init github.com/diego3/frame-engine,
and strip the frameengine/ segment from every import path. No further restructuring needed.

Not done here (deliberately, to keep this PR mechanical and reviewable): moving docs/adr/ and
docs/tdr/ (the plan also marks these Move, but they're prose with their own cross-links,
not import paths — better as its own follow-up), and updating .claude/skills/game-architecture
/game-dev's file-path references (already flagged as a known follow-up in the plan itself).

Validation

  • go build ./..., go vet ./..., gofmt -l (clean).
  • go test ./... and go test -race ./...: all passing except the same pre-existing
    box2d-go checkptr failure this repo has documented multiple times before (triggered by any
    CreateWorld call, unrelated to this repo's code or this move).
  • WASM cross-compile check (GOOS=js GOARCH=wasm go build): passes.
  • Live smoke run of both games/demo1 and games/metalslug_demo: identical output to before the
    move (same physics-body listing, same point where the sandbox's known audio limitation stops
    the run).

Generated by Claude Code

Physically moves every package classified as "Move" in
docs/frame_engine_migration_plan.md's inventory into a single new
frameengine/ directory, mirroring that plan's proposed frame-engine
repo layout exactly (frameengine/application/{config,engine,game,data},
event, events, object, physics, ports, process, resource, script,
vec2, view/{ui,input,camera,scene}).

Nothing outside frameengine/ changes behavior -- this is a pure move
plus import-path rewrite (goengine/x -> goengine/frameengine/x) within
the same module. main.go, main_wasm.go, and games/metalslug_demo's
scene.go are updated to import from the new paths; games/, logic/,
and docs/ are untouched, since they're staying in this repo per the
plan's inventory.

Once frame-engine (github.com/diego3/frame-engine) is ready to receive
it, the actual repo split becomes: copy frameengine/*'s contents to
the new repo's root, `go mod init github.com/diego3/frame-engine`, and
strip the "frameengine/" segment from every import path -- no other
restructuring needed, since this directory's internal layout already
*is* the target repo's layout.

Stacked on #26 (the WorldScene/MainMenu split) -- that split had to
land first so this move carries the generic scene.WorldScene, not the
old game-logic-leaking MainMenu.

Verified: go build/go vet/gofmt clean on every touched file, go test
(+ -race, same pre-existing box2d-go checkptr failure as before,
unrelated) all passing, a WASM cross-compile check, and a live smoke
run of both games/demo1 and games/metalslug_demo (identical output to
pre-move).
@diego3
diego3 marked this pull request as ready for review July 30, 2026 01:24
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

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.

@diego3
diego3 merged commit b91da2a into claude/split-worldscene-from-metalslug Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants