Conversation Summary (Jan 29, 2026)
Goals and constraints
- User wants design suggestions only (no code changes) for refactoring
SphereLevel into core architecture.
- Keep gameplay logic in projected 2D for now; 4D is future-facing and should not drive current implementation details.
- Prefer an approach that does not introduce "code smell" for 2D levels.
Key decisions and conclusions
- Projected 2D collisions are acceptable; the game remains 2D at its core with spatial presentation layers.
- Arrow effects already spawn after connection via
EffectsFactory and should continue to follow projected line points.
- Obstacles should remain 2D overlays under projected-2D rules (same as current Sphere behavior).
- Clock in 3D should remain a 2D overlay to match current Sphere behavior and maintain collision semantics.
- Avoid a mandatory "space mode" for 2D. Use an optional spatializer only when Dimension > 2.
- Spatializer can act as a preset that also owns core behaviors, with optional internal modifiers. (optional)
Architecture options discussed
- Option A (Optional Spatializer) is preferred:
- Keep existing
BaseLevel rule classes (Standard/Clock/DarkMode/etc).
- Add an optional spatializer only for Dimension > 2.
- Spatializer owns projection, visibility/backface logic, overlays (equator), and rotation input.
- 2D levels remain unchanged and bypass the spatializer entirely.
- Option B (Level Modifiers) was discussed as a more composable alternative:
- Keep rules unchanged.
- Add a list of
LevelModifiers in data (e.g., SphereProjection, EquatorOverlay, RotationInput).
- Only levels that need 3D/4D attach modifiers.
- Requires ordering/dependency management between modifiers.
Files referenced
Assets/Game/4-scripts/01-core/4-level/SphereLevel.cs
Assets/Game/4-scripts/01-core/4-level/ClockLevel.cs
Assets/Game/4-scripts/04-gameplay/1-mgrs/LevelMgr.cs
Assets/Game/4-scripts/04-gameplay/2-cntrls/DotConnectionController.cs
Assets/Game/4-scripts/07-effects/1-core/EffectsFactory.cs
Assets/Game/4-scripts/07-effects/ArrowEffect.cs