User prompt
Move harmony up 10
User prompt
Move Khalida up 10
User prompt
Slightly decrease the sizes of images in dots 21-25
User prompt
Make harmony image bigger
User prompt
When dots 21-25 are clicked scroll through the blank, PJ, KJ, Harmony, Khalida and Sapphire images on the spot they are clicked
User prompt
Make green square behind the images invisible
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'includes')' in or related to this line: 'if (storyText.text.includes('To solve the puzzles')) {' Line Number: 205
User prompt
Click text to bring up clues
User prompt
Make text bold
User prompt
Change text font to times New Roman
User prompt
Allow multiple lines in text so it all fits inside story box
User prompt
Increase text size
User prompt
Make text black
User prompt
Add text to story asset that says " To solve the puzzles, you must follow the clues to work out where everything belongs.."
User prompt
Move story to bottom of screen
User prompt
Add story asset to bottom of puzzle class scenes
User prompt
Make dot 1-5 invisible
User prompt
If an instrument image is being shown prevent it being shown again in another box
User prompt
Change instrument image scale to 1.0
User prompt
Make images bigger
User prompt
Make the dots start on the blank image
User prompt
When dots 1-5 are clicked scroll through the blank, saxophone, drum, gutair, harp and flute images on the spot they are clicked
User prompt
When dots 1-5 are clicked scroll through the blank, saxophone, drum, gutair, harp and flute images
User prompt
Add instruments image to dots 1-5 as a default starting position
User prompt
Increase instrument scale from 0.8 to 1.0 to make instruments bigger
/**** * Classes ****/ // Character class for main character gameplay elements var Character = Container.expand(function () { var self = Container.call(this); // Example: add a character sprite (replace 'Sprite' with your character asset if needed) var characterSprite = self.attachAsset('Sprite', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); // Example: character name self.name = "Lyra"; // Example: character state self.isActive = true; // Example: method to set character name self.setName = function (newName) { self.name = newName; }; // Example: method to activate/deactivate character self.setActive = function (active) { self.isActive = !!active; }; // Example: update method for per-frame logic self.update = function () { // Add per-frame logic for the character here }; return self; }); // Dot class for interactive dots in the puzzle var Dot = Container.expand(function () { var self = Container.call(this); // Create a visual representation for the dot var dotGraphics = self.attachAsset('Street', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.8, scaleY: 1.8, alpha: 0 }); // Dot properties self.isActive = false; self.gridX = 0; self.gridY = 0; self.instrumentIndex = 0; self.currentInstrument = null; // Array of instrument image IDs for first row (dots 1-5) self.instruments = ['Blank', 'Saxophone', 'Drum', 'Gutair', 'Harp', 'Flute']; // Array of image IDs for dots 21-25 (bottom row) self.specialInstruments = ['Blank', 'PJ', 'KJ', 'Harmony', 'Khalida', 'Sapphire']; // Method to toggle dot state self.toggle = function () { self.isActive = !self.isActive; }; // Method to cycle through instruments for first row (dots 1-5) self.cycleInstrument = function () { // Remove current instrument if it exists and free it from usedInstruments if (self.currentInstrument) { var currentInstrumentId = self.instruments[self.instrumentIndex]; if (currentInstrumentId !== 'Blank' && usedInstruments[currentInstrumentId] === self) { delete usedInstruments[currentInstrumentId]; } self.removeChild(self.currentInstrument); self.currentInstrument = null; } // Find next available instrument var startIndex = self.instrumentIndex; var found = false; do { self.instrumentIndex = (self.instrumentIndex + 1) % self.instruments.length; var instrumentId = self.instruments[self.instrumentIndex]; // Check if instrument is available (Blank is always available) if (instrumentId === 'Blank' || !usedInstruments[instrumentId]) { found = true; // Mark non-blank instruments as used if (instrumentId !== 'Blank') { usedInstruments[instrumentId] = self; } // Create new instrument image self.currentInstrument = self.attachAsset(instrumentId, { anchorX: 0.5, anchorY: 0.5, scaleX: 1.0, scaleY: 1.0 }); break; } } while (self.instrumentIndex !== startIndex); // If no available instrument found, stay on current (shouldn't happen with 6 instruments for 5 dots) if (!found) { self.instrumentIndex = startIndex; } }; // Method to cycle through special images for dots 21-25 (bottom row) self.cycleSpecialInstrument = function () { // Remove current instrument if it exists if (self.currentInstrument) { self.removeChild(self.currentInstrument); self.currentInstrument = null; } // Advance index if (typeof self.specialInstrumentIndex !== "number") self.specialInstrumentIndex = 0; self.specialInstrumentIndex = typeof self.specialInstrumentIndex === "number" ? self.specialInstrumentIndex : 0; self.specialInstrumentIndex = (self.specialInstrumentIndex + 1) % self.specialInstruments.length; var instrumentId = self.specialInstruments[self.specialInstrumentIndex]; // Slightly decrease the size of all special images for dots 21-25 var scaleX = 0.85; var scaleY = 0.85; if (instrumentId === 'Harmony') { scaleX = 1.45; scaleY = 1.45; } // Move Khalida or Harmony image up by 10 pixels var extraY = 0; if (instrumentId === 'Khalida' || instrumentId === 'Harmony') { extraY = -10; } self.currentInstrument = self.attachAsset(instrumentId, { anchorX: 0.5, anchorY: 0.5, scaleX: scaleX, scaleY: scaleY, y: extraY }); }; // Touch/click handler self.down = function (x, y, obj) { // Only cycle instruments for dots 1-5 (first row) if (self.gridY === 0) { self.cycleInstrument(); } // Dots 21-25 (bottom row, gridY === 4, gridX 0-4) else if (self.gridY === 4) { self.cycleSpecialInstrument(); } self.toggle(); }; // Initialize dot as inactive // Initialize with blank instrument self.currentInstrument = self.attachAsset('Blank', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.0, scaleY: 1.0 }); return self; }); // Location class for managing a location in the game var Location = Container.expand(function () { var self = Container.call(this); // Example: add a background image to the location (replace 'Street' with your location asset if needed) var bg = self.attachAsset('Street', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); // Example: location name self.name = "Default Location"; // Example: method to set location name self.setName = function (newName) { self.name = newName; }; // Example: update method for per-frame logic self.update = function () { // Add per-frame logic for the location here }; return self; }); // Puzzle class for managing a puzzle element in the game var Puzzle = Container.expand(function () { var self = Container.call(this); // Add a 4x5 asset to the puzzle and scale it to be exactly 2048 wide var targetWidth = 2048; var assetWidth = 1000; var scale = targetWidth / assetWidth; // Center horizontally, align to top var puzzleImage = self.attachAsset('4x5', { anchorX: 0.5, anchorY: 0, x: 2048 / 2, y: 0, scaleX: scale, scaleY: scale }); // Add story asset at the bottom of the screen var storyAsset = self.attachAsset('Story', { anchorX: 0.5, anchorY: 1, x: 2048 / 2, y: 2732 - 50, // Position at bottom of screen with padding scaleX: 0.0625, // Scale down from 32768 to 2048 width (2048/32768) scaleY: 0.0625 // Maintain aspect ratio }); // Add instructional text on top of story asset with line breaks var storyText = new Text2('To solve the puzzles, you must\nfollow the clues to work out\nwhere everything belongs..', { size: 72, fill: 0x000000, align: 'center', font: "'Times New Roman Bold','Times New Roman','GillSans-Bold',Impact,'Arial Black',Tahoma" }); storyText.anchor.set(0.5, 0.5); storyText.x = 2048 / 2; storyText.y = 2732 - 50 - storyAsset.height * 0.0625 / 2; self.addChild(storyText); // Create 25 dots in a 5x5 grid self.dots = []; var gridSize = 5; var dotSpacing = targetWidth / (gridSize + 1); // Distribute dots evenly across the width var gridHeight = puzzleImage.height * scale; var verticalSpacing = gridHeight / (gridSize + 1); for (var row = 0; row < gridSize; row++) { for (var col = 0; col < gridSize; col++) { var dot = new Dot(); dot.gridX = col; dot.gridY = row; // Position dots over the 4x5 asset dot.x = (col + 1) * dotSpacing; dot.y = (row + 1) * verticalSpacing; self.dots.push(dot); self.addChild(dot); } } // Example: puzzle state self.isSolved = false; // Example: method to check if puzzle is solved self.checkSolved = function () { // Implement puzzle-specific logic here // Set self.isSolved = true if solved }; // Example: update method for per-frame logic self.update = function () { // Add per-frame puzzle logic here // For example, check for completion self.checkSolved(); }; return self; }); // Scene class for managing a scene in the game var Scene = Container.expand(function () { var self = Container.call(this); // Example: add a background image to the scene // (Replace 'Dream' with the desired asset for your scene) var bg = self.attachAsset('Dream', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); // Add any additional scene setup here // Scene update method (called every tick if attached to game) self.update = function () { // Add per-frame logic for the scene here }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Track which instruments are currently in use var usedInstruments = {}; // Add Puzzle to the game when it starts var puzzle = new Puzzle(); game.addChild(puzzle); ;
===================================================================
--- original.js
+++ change.js
@@ -111,11 +111,11 @@
if (instrumentId === 'Harmony') {
scaleX = 1.45;
scaleY = 1.45;
}
- // Move Khalida image up by 10 pixels
+ // Move Khalida or Harmony image up by 10 pixels
var extraY = 0;
- if (instrumentId === 'Khalida') {
+ if (instrumentId === 'Khalida' || instrumentId === 'Harmony') {
extraY = -10;
}
self.currentInstrument = self.attachAsset(instrumentId, {
anchorX: 0.5,
Add more vibrant colours to picture
Make this scene more modern like in the present
A 4x5 grid in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Remove man
Saxophone in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Harp in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Drum in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Flute in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Question mark professor Layton game style. In-Game asset. 2d. High contrast. No shadows
12yo blonde girl in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Cute little10yo girl brown hair in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Cute little 7yo girl with blonde curly hair. Professor Layton game style In-Game asset. 2d. High contrast. No shadows
15 yo boy with short scruffy blonde hair professor Layton game style. In-Game asset. 2d. High contrast. No shadows
18yo girl with short brown hair professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Cat in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
White dog with brown patch on eyes professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Turtle in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Frog in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Goldfish in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Basketball ball professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Lego bricks professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Video game console professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Teddy bear professor Layton game style. In-Game asset. 2d. High contrast. No shadows
These dolls in professor Layton game art style
Hot chips or fries in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Bowl of spaghetti in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Pizza in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Chocolate donut in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Ice cream cone in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Make her crack a small smile
The word "correct" in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
The word " incorrect" in professor Layton game style. In-Game asset. 2d. High contrast. No shadows
Green tick in professor Layton gamestyle. In-Game asset. 2d. High contrast. No shadows
Button with RETRY PUZZLE on it in professor Layton game style artwork In-Game asset. 2d. High contrast. No shadows
Information symbol in professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Number 1 button professor Layton game style artwork. In-Game asset. 2d. High contrast. No shadows
Number 2
Number 3
Number 4
Number 5
Remove clock
Make sure J and Y is not cut off
How to play button in professor Layton game style font. In-Game asset. 2d. High contrast. No shadows
Make robe hang lower so you can't see it's feet
Make it say play new puzzle
A 16:9 title banner