58 Commits

Author SHA1 Message Date
Thomas Richter
fd3517da85 deploy: update image to latest 2026-02-05 23:31:23 +01:00
Thomas Richter
283c88134a deploy: update image to latest 2026-02-05 19:46:22 +01:00
Thomas Richter
077e58216c deploy: update image to latest 2026-02-05 19:33:30 +01:00
Thomas Richter
2ad205d495 fix: whale stays longer (15s) and no pointer cursor
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 01:43:56 +01:00
Thomas Richter
c220ea4b53 feat: add swimming whale to Deep Sea scene
- Whale enters from random edge, exits to different edge
- 5 second smooth swim with Sine.inOut easing
- 2 second respawn delay
- Bioluminescent eye glow effect
- Subtle bobbing animation during movement

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:46:30 +01:00
Thomas Richter
3328269499 feat: add Deep Sea alternative hunting area
- Add Deep Sea location to navigation map
- Create DeepSeaHuntingScene with dark atmosphere
- Add deep ocean transition visuals
- Bioluminescent particles and giant shadows

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:29:32 +01:00
Thomas Richter
f2be8ca3d0 style: move fullscreen button to top-left corner 2026-02-05 00:10:16 +01:00
Thomas Richter
be41f912a2 feat: add fullscreen mode toggle button
- Add src/utils/fullscreen.js with createFullscreenButton() helper
- Fullscreen button appears in bottom-right corner of all scenes
- Click to toggle fullscreen mode
- Uses Phaser's built-in scale manager

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:05:03 +01:00
Thomas Richter
1154a78908 feat: add responsive font sizing for mobile
- Add src/utils/responsive.js with fontSize() helper
- Mobile fonts scale 1.4x for better readability
- Update all scenes to use responsive font sizes
- Update deploy-k8s.sh with full deployment steps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:50:29 +01:00
Thomas Richter
b0fb15fe7b feat: add Kubernetes deployment with ArgoCD
- Add k8s/ manifests (Deployment, Service, Ingress)
- Use Kustomize for configuration
- ArgoCD application for GitOps deployment
- Traefik ingress with Let's Encrypt TLS
- Deploy script for CI/CD workflow

Deploys to: https://whalehunting.kube2.tricnet.de

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:28:55 +01:00
Thomas Richter
576799ae0e docs: map existing codebase
- STACK.md - Technologies and dependencies
- ARCHITECTURE.md - System design and patterns
- STRUCTURE.md - Directory layout
- CONVENTIONS.md - Code style and patterns
- TESTING.md - Test structure
- INTEGRATIONS.md - External services
- CONCERNS.md - Technical debt and issues
2026-02-04 23:16:04 +01:00
Thomas Richter
24a44583ef Configure Vitest UI for network access
- Set server host to 0.0.0.0 for remote access
- Set explicit port 51204 for Vitest UI
- Allows accessing test UI from other machines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 21:13:45 +01:00
Thomas Richter
b52cdb0685 Add comprehensive test suite with Vitest and Playwright
**Unit Tests (Vitest):**
- Test game logic: inventory management, barrel calculations
- Test whale hunting mechanics: fuel consumption, oil rewards, health system
- Test mobile detection patterns
- Test crosshair bounds and scene transitions
- 21 unit tests covering core game logic
- Fast execution with jsdom environment

**E2E Tests (Playwright):**
- Test complete game flows from intro to hunting
- Test scene navigation and transitions
- Test whale hunting interaction
- Test mobile compatibility and touch interactions
- Test desktop scaling on various viewports
- Run on both desktop (Chrome) and mobile (iPhone 12) configurations

**Test Scripts:**
- npm test - Run unit tests
- npm run test:ui - Run unit tests with UI
- npm run test:coverage - Run with coverage report
- npm run test:e2e - Run E2E tests
- npm run test:e2e:ui - Run E2E tests with UI
- npm run test:all - Run all tests

**Configuration:**
- Vitest configured with jsdom for fast unit testing
- Playwright configured with automatic dev server startup
- Test coverage reporting enabled
- Separate unit and E2E test directories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 06:48:02 +01:00
Thomas Richter
dc28c9f6eb Add deployment script for automated sync and container rebuild
Creates deploy.sh script that:
- Syncs files to node03 server using rsync
- Rebuilds and restarts the Docker container
- Shows deployment status and container health

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 05:32:44 +01:00
Thomas Richter
89a47cd721 Fix scaling and controls for desktop displays
- Remove max scale bounds to support unlimited display sizes (4K, 8K, ultrawide)
- Remove duplicate width/height from scale config to fix desktop scaling
- Fix HuntingScene to default to mouse mode on all platforms (was incorrectly starting in keyboard mode on desktop)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 05:28:58 +01:00
Thomas Richter
8de3f594f9 Add comprehensive mobile support with touch controls and responsive design
Implemented full mobile optimization to make the game mobile-ready:

**Core Mobile Support:**
- Updated viewport meta tag to prevent zoom and improve touch responsiveness
- Added mobile web app meta tags for iOS/Android standalone mode
- Enhanced CSS to prevent text selection, pull-to-refresh, and tap highlights
- Configured Phaser scale system with min/max bounds (320x240 to 1920x1080)
- Added fullscreen support for game container

**Touch Controls:**
- Added mobile device detection to HuntingScene
- Automatically default to touch controls on mobile devices
- Hide keyboard control instructions on mobile
- Only hide cursor on desktop (preserve default cursor on mobile)
- Adjusted messaging for mobile ("Tap to shoot" vs "Click to shoot")

**Touch Feedback:**
- Added pointerdown/pointerup handlers to all interactive buttons
- Buttons now scale down when pressed (0.95x) for tactile feedback
- Maintained hover effects for desktop compatibility
- Updated IntroScene "SET SAIL" button with touch feedback
- Updated MapScene location markers and close button
- Updated TransitionScene continue button
- All touch feedback works on both touch and mouse inputs

**Backward Compatibility:**
- All desktop functionality preserved
- Hover effects still work on desktop
- Keyboard controls available on desktop
- Touch and mouse inputs work seamlessly together

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 05:17:09 +01:00
Thomas Richter
1e5f4f35cd Fix health check to use IPv4 address
- Change health check from localhost to 127.0.0.1
- Fixes connection refused error (localhost resolves to IPv6)
- Both Dockerfile and docker-compose.yml updated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 04:58:13 +01:00
Thomas Richter
e8f8a6a4ef Remove debug lines from ship's wheel
- Clean up green crosshair and bounding box
- Wheel now displays without debug visualization

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:28:59 +01:00
Thomas Richter
67e3e924de Fix wheel spoke drawing using graphics.lineBetween
- Replace add.line() with graphics.lineBetween()
- Remove debug lines (no longer needed)
- Spokes now draw correctly with proper positioning

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:28:17 +01:00
Thomas Richter
8c1a7f0079 Add blue debug lines for wheel spokes
- Draw blue lines along each spoke
- Show circles at spoke endpoints
- Visualize spoke positioning and angles

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:26:55 +01:00
Thomas Richter
7e1a2de6aa Add debug lines for ship's wheel
- Green crosshair at wheel center
- Bounding box showing wheel dimensions
- Helps visualize wheel positioning

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:25:44 +01:00
Thomas Richter
476198806d Add pirate-themed language throughout game
Ship Deck Scene:
- "Yer Whaling Vessel" instead of "The Whaling Vessel"
- "Ahoy, matey!" welcome message
- Pirate expressions in barrel messages (Arr!, Aye!, fer, yer)
- "ye scurvy dog" in instructions
- "savvy?" in penguin messages

Intro Scene:
- "A Whaling Adventure on the High Seas"
- "SET SAIL" button instead of "START GAME"
- "Cast off and seek yer fortune!" instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:18:49 +01:00
Thomas Richter
08e7cfc33c Remove debug border lines from barrel group
- Clean up debug visualization
- Barrels now properly centered without visual guides

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:14:02 +01:00
Thomas Richter
fb5b6a1dad Fix barrel group vertical centering calculation
- Correct baseY calculation to account for barrel centers
- baseY now positions bottom barrel so group center aligns with deck center
- Remove incorrect groupHeight calculation
- Both fuel and oil barrels now properly centered

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:02:34 +01:00
Thomas Richter
95bb8f6e73 Update debug lines to show barrel group borders
- Draw complete border around fuel barrel group
- Shows top, bottom, left, and right edges
- Helps visualize barrel group boundaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 05:00:20 +01:00
Thomas Richter
820cd25c1c Add debug center lines for fuel barrel group
- Draw red horizontal line at deck vertical center
- Draw red vertical line through barrel group center
- Helps visualize alignment and centering

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:20:23 +01:00
Thomas Richter
5290cd2f8c Update barrel centering to use actual deck edges
- Store deckTopEdge and deckBottomEdge as properties
- Use these edges for barrel vertical centering
- Barrels now align with border dimensions
- Both fuel and oil barrels properly centered

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:18:02 +01:00
Thomas Richter
26257fe13e Fix deck border alignment with plank edges
- Calculate deck edges accounting for plank height
- Border now aligns with top of first plank and bottom of last plank
- Proper vertical centering of border rectangle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:14:40 +01:00
Thomas Richter
bb3b2f8b3b Add border around ship deck
- Draw 4px border outline around deck area
- Uses dark brown color matching planks
- Transparent fill to show planks underneath
- Clearly defines deck boundaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:12:49 +01:00
Thomas Richter
baa27b6f99 Center barrel groups vertically on deck
- Calculate total height of each barrel group
- Position groups at vertical center of deck
- Both fuel and oil barrels now centered vertically
- More balanced visual layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:09:22 +01:00
Thomas Richter
db41410983 Adjust barrel vertical alignment to deck surface
- Move barrels from deckBottomY + 40 to deckBottomY - 10
- Barrels now sit on deck surface instead of below it
- Better vertical alignment with deck planks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:05:49 +01:00
Thomas Richter
b1db1c1402 Center barrel groups within their deck sections
- Calculate total width of each barrel group
- Center fuel barrels in left quarter of deck
- Center oil barrels in right quarter of deck
- More balanced and symmetrical layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 04:00:32 +01:00
Thomas Richter
7e0a4f4e19 Position barrels relative to deck dimensions
- Store deck dimensions as properties
- Calculate deck boundaries (left, right, top, bottom)
- Position fuel barrels relative to deck left edge
- Position oil barrels relative to deck center
- Both positioned relative to deck bottom

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 03:58:22 +01:00
Thomas Richter
8552f179cc Fix barrel positioning to stay within deck boundaries
- Reduce barrel size from 60x80 to 50x70
- Lower base position from y=420 to y=450
- Increase fuel barrels per row from 4 to 5
- Adjust spacing to prevent overflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 03:56:55 +01:00
Thomas Richter
94073b2910 Add visual container system with stacked barrels
- Replace single barrels with dynamic stacked containers
- 1 barrel = 10 units (100 fuel = 10 barrels, 50 oil = 5 barrels)
- Fuel barrels stacked on left, oil barrels on right
- Interactive zones for each barrel group
- Barrels update dynamically when inventory changes
- Realistic ship storage appearance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 03:55:00 +01:00
Thomas Richter
810377b76d Update fuel barrel message to reference boiling whale blubber
Changed message to clarify fuel is for cooking whale oil,
not for running the ship.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 03:46:29 +01:00
Thomas Richter
a17500dff4 Add intro scene with title screen
- Create IntroScene with ocean-themed background
- Display game title and 18th century whaling subtitle
- Add decorative waves and ship silhouette
- Implement START GAME button with hover effects
- Initialize inventory and transition to ShipDeckScene

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 03:43:27 +01:00
Thomas Richter
d6941621cd Fix Docker build and change port to 8880
- Install all dependencies including devDependencies for build
- Change port mapping from 8080 to 8880

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 23:40:14 +01:00
Thomas Richter
0064773eaa Add Docker-based production deployment
- Multi-stage Dockerfile with Node builder and nginx server
- Nginx configuration with gzip, security headers, and caching
- Docker Compose setup with health checks
- Updated README with deployment instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 23:34:05 +01:00
Thomas Richter
09fd0629af Improve whale boundary behavior to avoid edge sticking
- Increased boundary margin: 60 → 100 pixels
- Push whale 20px away from edge when bouncing (not just clamping)
- Add random variation to bounce speed
- Randomize Y direction when hitting horizontal edges
- Tighter vertical bounds: 150-500 (was 120-550)
- Prevents whale from getting stuck near edges
- More natural swimming patterns in center area

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 23:29:14 +01:00
Thomas Richter
604c26fcc1 Double the size of the whale
- Body ellipse: 80x40 → 160x80
- Tail size and position doubled
- Fin size and position doubled
- Health bar: 60x6 → 120x12 (offset -70)
- Collision radius: 40 → 80
- Updated bodyWidth/bodyHeight data
- Whales now much more visible and easier to target

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 12:23:00 +01:00
Thomas Richter
5946172728 Keep whale swimming within visible area
- Added proper boundary margins (60px) for whale size and bobbing
- Clamps whale position to bounds when hitting edges
- Uses Math.abs() for reliable direction reversal
- Properly flips whale sprite when bouncing
- Bounds: X: 60-740, Y: 120-550
- Whale can no longer escape off screen

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 12:20:47 +01:00
Thomas Richter
033da743b3 Reduce whale swimming speed
- Horizontal swim speed: 0.5-1.0 → 0.2-0.5 (60% slower)
- Vertical drift: 0.3 → 0.15 (50% slower)
- Makes whales easier to track and hit
- Better difficulty balance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 12:17:56 +01:00
Thomas Richter
bbd791bb68 Add whale swimming and diving mechanics
- Whales now swim across screen with directional movement
- Random horizontal speed (0.5-1.0) and vertical drift
- Bounces off screen edges and flips direction
- Diving behavior: dives every 3-7 seconds for 2 seconds
- Fades to 20% opacity when diving, full when surfaced
- Cannot be hit while diving (invulnerable)
- Shows dive/surface messages
- Combines swimming with bobbing animation
- Much more dynamic and challenging hunting
- Whales are now moving targets instead of stationary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:26:23 +01:00
Thomas Richter
16ef3dd2aa Fix hidden mouse cursor after returning from hunting
- Restore default cursor in returnToMap() before scene transition
- Prevents cursor staying hidden when returning to map
- Cursor was set to 'none' for crosshair aiming but not restored

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:19:19 +01:00
Thomas Richter
bc95f94d1b Hide penguin references until feature is discovered
- Penguin inventory line only shows when penguins > 0
- Penguin cage and emoji on ship deck hidden until discovered
- Antarctic Island description made mysterious (no penguin mention)
- Penguin cage visibility updates when inventory changes
- Creates surprise discovery moment when visiting Antarctic Island
- Maintains dark humor reveal during gameplay

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:13:22 +01:00
Thomas Richter
2b8be8c9f2 Add capacity display to inventory in all scenes
- Updated inventory display format from "Fuel: 80" to "Fuel: 80/100"
- Shows max capacity for all resources:
  - Fuel: /100
  - Whale Oil: /50 (cargo hold capacity)
  - Penguins: /20
- Applied to HuntingScene, ShipDeckScene, and MapScene
- Players can now see remaining capacity at a glance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:05:57 +01:00
Thomas Richter
1215fadc88 Make whales spawn randomly across entire screen
- Changed whale spawn from center area to full screen
- X position: 100-700 (was 350-450)
- Y position: 150-500 (was 250-350)
- Each whale now appears in unpredictable location
- Keeps margins to avoid edge spawning
- Increases gameplay variety and challenge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:03:09 +01:00
Thomas Richter
9b5f566bce Make crosshair shake smooth with oscillation
- Replaced random shake with smooth sine/cosine oscillation
- Added crosshairShakeTime variable to track oscillation phase
- Uses different frequencies (3x and 2.5x) for natural circular motion
- Creates predictable, smooth shake pattern instead of jittery random
- More comfortable aiming experience while maintaining difficulty

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 04:01:38 +01:00
Thomas Richter
68ddb1aef7 Double whale movement oscillation
- Increased horizontal whale movement from 15px to 30px
- Increased vertical whale movement from 10px to 20px
- Whale now bobs twice as much, increasing difficulty
- Makes targeting more challenging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 03:59:26 +01:00