diff --git a/js/core/game.js b/js/core/game.js index 70f9015..84b9650 100644 --- a/js/core/game.js +++ b/js/core/game.js @@ -35,6 +35,10 @@ export function preload() { this.load.tilemapTiledJSON('room_closet', 'assets/rooms/room_closet2.json'); this.load.tilemapTiledJSON('room_servers', 'assets/rooms/room_servers2.json'); + // Load new variable-sized rooms for grid system + this.load.tilemapTiledJSON('small_room_1x1gu', 'assets/rooms/small_room_1x1gu.json'); + this.load.tilemapTiledJSON('hall_1x2gu', 'assets/rooms/hall_1x2gu.json'); + // Load room images (now using smaller 32px scale images) this.load.image('room_reception', 'assets/tiles/rooms/room1.png'); this.load.image('room18', 'assets/tiles/rooms/room18.png'); diff --git a/scenarios/test_complex_multidirection.json b/scenarios/test_complex_multidirection.json index dffa748..24cfdd9 100644 --- a/scenarios/test_complex_multidirection.json +++ b/scenarios/test_complex_multidirection.json @@ -12,7 +12,7 @@ ], "rooms": { "reception": { - "type": "room_reception2", + "type": "room_reception", "connections": { "north": "office2" }, @@ -26,7 +26,7 @@ ] }, "office2": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "office2_key", @@ -59,7 +59,7 @@ ] }, "office1": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "office1_key", @@ -84,7 +84,7 @@ ] }, "storage": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "storage_key", @@ -101,7 +101,7 @@ ] }, "servers": { - "type": "room_servers2", + "type": "room_servers", "locked": true, "lockType": "key", "requires": "server_key", @@ -119,7 +119,7 @@ ] }, "ceo": { - "type": "room_ceo2", + "type": "room_ceo", "locked": true, "lockType": "key", "requires": "ceo_key", diff --git a/scenarios/test_horizontal_layout.json b/scenarios/test_horizontal_layout.json index 0b09c72..e1b1a31 100644 --- a/scenarios/test_horizontal_layout.json +++ b/scenarios/test_horizontal_layout.json @@ -3,7 +3,7 @@ "startRoom": "reception", "rooms": { "reception": { - "type": "room_reception2", + "type": "room_reception", "connections": { "north": "office" }, @@ -24,7 +24,7 @@ ] }, "office": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "office_key", @@ -44,7 +44,7 @@ ] }, "storage": { - "type": "room_office2", + "type": "room_office", "connections": { "east": "office" }, @@ -65,7 +65,7 @@ ] }, "servers": { - "type": "room_servers2", + "type": "room_servers", "locked": true, "lockType": "key", "requires": "server_key", diff --git a/scenarios/test_mixed_room_sizes.json b/scenarios/test_mixed_room_sizes.json index b9568b3..ebc85ed 100644 --- a/scenarios/test_mixed_room_sizes.json +++ b/scenarios/test_mixed_room_sizes.json @@ -1,9 +1,9 @@ { - "scenario_brief": "Test Scenario: Mixed Room Sizes\n\nThis scenario demonstrates the grid system's ability to handle rooms of different sizes and properly align doors between them.\n\nRoom Sizes Used:\n- 1×1 GU (Closet): 5×6 tiles = 160×192px (small_room_1x1gu.json)\n- 2×1 GU (Hall): 10×6 tiles = 320×192px (hall_1x2gu.json)\n- 2×2 GU (Standard): 10×10 tiles = 320×320px (room_office2.json, room_ceo2.json)\n\nLayout:\n [Closet-1×1] [CEO-2×2]\n ↑ ↑\n [Wide Hall-2×1]\n ↑\n [Reception-2×2]\n\nTests:\n- Different room sizes in same scenario\n- Door alignment between different-sized rooms\n- Centering of smaller rooms on larger rooms\n- Wide horizontal hallway (2×1 GU)\n- Grid-based positioning with varied dimensions", + "scenario_brief": "Test Scenario: Mixed Room Sizes\n\nThis scenario demonstrates the grid system's ability to handle rooms of different sizes and properly align doors between them.\n\nRoom Sizes Used:\n- 1×1 GU (Closet): 5×6 tiles = 160×192px (small_room_1x1gu)\n- 2×1 GU (Hall): 10×6 tiles = 320×192px (hall_1x2gu)\n- 2×2 GU (Standard): 10×10 tiles = 320×320px (room_reception, room_ceo)\n\nLayout:\n [Closet-1×1] [CEO-2×2]\n ↑ ↑\n [Wide Hall-2×1]\n ↑\n [Reception-2×2]\n\nTests:\n- Different room sizes in same scenario\n- Door alignment between different-sized rooms\n- Centering of smaller rooms on larger rooms\n- Wide horizontal hallway (2×1 GU)\n- Grid-based positioning with varied dimensions", "startRoom": "reception", "rooms": { "reception": { - "type": "room_reception2", + "type": "room_reception", "connections": { "north": "hall" }, @@ -73,7 +73,7 @@ ] }, "ceo": { - "type": "room_ceo2", + "type": "room_ceo", "locked": true, "lockType": "key", "requires": "ceo_key", diff --git a/scenarios/test_multiple_connections.json b/scenarios/test_multiple_connections.json index bf4aff8..4b2f688 100644 --- a/scenarios/test_multiple_connections.json +++ b/scenarios/test_multiple_connections.json @@ -3,7 +3,7 @@ "startRoom": "reception", "rooms": { "reception": { - "type": "room_reception2", + "type": "room_reception", "connections": { "north": "hub" }, @@ -24,7 +24,7 @@ ] }, "hub": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "hub_key", @@ -61,7 +61,7 @@ ] }, "server1": { - "type": "room_servers2", + "type": "room_servers", "locked": true, "lockType": "key", "requires": "server1_key", @@ -79,7 +79,7 @@ ] }, "server2": { - "type": "room_servers2", + "type": "room_servers", "locked": true, "lockType": "key", "requires": "server2_key", @@ -97,7 +97,7 @@ ] }, "server3": { - "type": "room_servers2", + "type": "room_servers", "locked": true, "lockType": "key", "requires": "server3_key", diff --git a/scenarios/test_vertical_layout.json b/scenarios/test_vertical_layout.json index 869f698..6c28614 100644 --- a/scenarios/test_vertical_layout.json +++ b/scenarios/test_vertical_layout.json @@ -3,7 +3,7 @@ "startRoom": "reception", "rooms": { "reception": { - "type": "room_reception2", + "type": "room_reception", "connections": { "north": ["office1", "office2"] }, @@ -24,7 +24,7 @@ ] }, "office1": { - "type": "room_office2", + "type": "room_office", "locked": true, "lockType": "key", "requires": "office1_key", @@ -42,7 +42,7 @@ ] }, "office2": { - "type": "room_office2", + "type": "room_office", "connections": { "south": "reception", "north": "ceo" @@ -58,7 +58,7 @@ ] }, "ceo": { - "type": "room_ceo2", + "type": "room_ceo", "locked": true, "lockType": "key", "requires": "ceo_key",