diff --git a/PLAN.md b/PLAN.md index 6c19033..d247415 100644 --- a/PLAN.md +++ b/PLAN.md @@ -28,22 +28,28 @@ - Production interval removed: all productions fire every turn - GDD updated with Pion, 6 levels -## Phase 5: Network levels and Dame (Queen) +## Phase 5: Dame, network levels, juice pass (DONE) -**Goal**: Open-ended logistics puzzles with interconnected supply networks. +- Dame (Queen): 8 directions, range 2, status 7 (highest) +- Levels 7-8: La Dame Blanche (10x10), Le Grand Reseau (12x10) +- Procedural SFX, particles, polished animations, fade transitions +- UI bugfixes: stop reset, piece selection visuals, back-to-menu button +- Trajectory preview on piece click -- Multiple productions feeding multiple demands through shared infrastructure. -- Dame piece: combines Rook + Bishop movement (range 2, all 8 directions). -- Powerful but expensive — forces cost/benefit tradeoffs. -- Larger boards (12x12+) with complex wall configurations. -- Potential for player-designed levels (level editor data format). +## Phase 6: Godot integration (DONE) -## Phase 6: Godot integration +- Board renderer, piece placement, step/play/pause controls +- Event visualization with simultaneous animations per phase +- Victory/defeat screens with animated metrics +- Production flash, cargo slide trails, destruction particles, confetti -**Goal**: Playable visual prototype. +## Phase 7: Zoom, scroll wheel, and camera polish -- Board renderer: grid, walls, buildings, pieces. -- Drag-and-drop piece placement during Edit phase. -- Step/play/pause simulation controls. -- Event visualization: cargo movement, transfers, delivery animations. -- Victory/defeat screens with Metrics display. +- Mouse scroll wheel to zoom in/out on board +- Zoom limits (min/max) to prevent getting lost +- Double-click to center on a piece + +## Phase 8: Level editor (future) + +- Player-designed levels via JSON export +- In-game editing of board size, walls, productions, demands, stock diff --git a/Scripts/Main.cs b/Scripts/Main.cs index 2df6376..d0bcd2a 100644 --- a/Scripts/Main.cs +++ b/Scripts/Main.cs @@ -71,6 +71,10 @@ public partial class Main : Node2D { if (mb.ButtonIndex == MouseButton.Middle) _panning = mb.Pressed; + else if (mb.Pressed && mb.ButtonIndex == MouseButton.WheelUp) + ZoomCamera(1.1f); + else if (mb.Pressed && mb.ButtonIndex == MouseButton.WheelDown) + ZoomCamera(0.9f); } else if (@event is InputEventMouseMotion motion && _panning) { @@ -78,6 +82,13 @@ public partial class Main : Node2D } } + private void ZoomCamera(float factor) + { + var newZoom = _camera.Zoom * factor; + newZoom = newZoom.Clamp(new Vector2(0.3f, 0.3f), new Vector2(3f, 3f)); + _camera.Zoom = newZoom; + } + private void FadeIn(float duration) { _fadeOverlay.Color = new Color(0, 0, 0, 1);