refactor(client): decompose GameScreen into focused components #119
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!119
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/gamescreen-decompose"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
GameScreenhad grown to ~950 lines carrying six concerns at once (connection lifecycle, the server-messageswitch, client world state + entity lookups, input handling, the draw passes, coordinate helpers) — the same god-class shapeWorld.csshed in #54.Split into focused collaborators, mirroring the
Worldfacade rule:ClientWorldServerMessageDispatcherClientWorld(wire → state + VFX)GameInputControllersendcallbackWorldRendererGridRendererScreenProjectionIsoProjection)PaletteGameScreenis now a ~130-line coordinator (was 946) that owns the connection and wires the components.Also adds the client mirror of the
WorldHARD GATE toCLAUDE.md: aScreenis a thin coordinator, not a god-class.Not in scope
Behaviour-preserving refactor: no protocol change, no gameplay change. No
ProtocolVersionbump.Definition of Done
GameScreen.cscontains no server-messageswitch, no per-id entity lookup, and no draw pass — only lifecycle + wiring + delegation (verifiable by reading the file: ~130 lines).dotnet testgreen (324 tests).CLAUDE.mdstates the Screen-is-a-thin-coordinator HARD GATE.just dev): log in, walk (right-drag), attack a creature, cast a spell, drag a ground item onto the bag, open bag/paperdoll — all behave exactly as onmain.f9ff0088b270a98e74a9