From 89a47cd7211c4f228c597a6aa5de4cbdf1bfab2e Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Thu, 18 Dec 2025 05:28:58 +0100 Subject: [PATCH] Fix scaling and controls for desktop displays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/main.js | 9 +-------- src/scenes/HuntingScene.js | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main.js b/src/main.js index 3733e60..bbd2f76 100644 --- a/src/main.js +++ b/src/main.js @@ -22,18 +22,11 @@ const config = { scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, - width: 800, - height: 600, min: { width: 320, height: 240 }, - max: { - width: 1920, - height: 1080 - }, - fullscreenTarget: 'game-container', - expandParent: false + fullscreenTarget: 'game-container' } }; diff --git a/src/scenes/HuntingScene.js b/src/scenes/HuntingScene.js index d3b7616..aca3fe3 100644 --- a/src/scenes/HuntingScene.js +++ b/src/scenes/HuntingScene.js @@ -22,8 +22,8 @@ export default class HuntingScene extends Phaser.Scene { // Detect mobile device this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - // Default to touch on mobile, keyboard on desktop - this.useKeyboard = !this.isMobile; + // Default to mouse/touch mode on all platforms + this.useKeyboard = false; // Ocean background this.add.rectangle(400, 300, 800, 600, 0x1e5a8e);