Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'game.addChildAt(background, 1);' Line Number: 1989
Code edit (4 edits merged)
Please save this source code
User prompt
Fade in the new background when changing background
Code edit (1 edits merged)
Please save this source code
User prompt
Make sure the background image is centered on the screen
User prompt
Please fix the bug: 'Timeout.tick error: game.contains is not a function. (In 'game.contains(background)', 'game.contains' is undefined)' in or related to this line: 'if (game.background && game.contains(background)) {' Line Number: 1965
Code edit (1 edits merged)
Please save this source code
User prompt
Upon mission complete change the background image
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (!isDragoning && board && board.gems && board.gems.length > 0) {' Line Number: 1701
Code edit (1 edits merged)
Please save this source code
User prompt
When starting the game Show the sagamap for 5 second, then close the sagamap and begin the game as it does now
User prompt
Create visualization for the sagamap
User prompt
Keeping what exists.Create a new sagamap
User prompt
As the timer checks approaches zero, starting from 10, 9, 8 and so on, have a large text label overlaid on the screen counting down.
Code edit (1 edits merged)
Please save this source code
User prompt
The confetti from the mission complete, make it fly out of the middle of the screen on the y-axis.
User prompt
Please fix the bug: 'Timeout.tick error: requestAnimationFrame is not a function' in or related to this line: 'requestAnimationFrame(animateScale);' Line Number: 613
User prompt
When the Mission Complete modal appears, animate the scale of that container, the modal and the elements, to be more exciting.
Code edit (1 edits merged)
Please save this source code
User prompt
When the dragon grabs a gem, animate the scale of the gem upon grabbing.
User prompt
Implement a special row blaster gem that appears after matching more than three gems.
User prompt
Please fix the bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var goalGemSpriteScale = currentGoalGemSprite.scale.x;' Line Number: 832
Code edit (2 edits merged)
Please save this source code
User prompt
in fillemptyspaces when checking to create a new gem - ensure Only proceed if theres no gems in any position in the gems array which is above the empty space array position
===================================================================
--- original.js
+++ change.js
@@ -1925,24 +1925,9 @@
var backgroundImages = ['magicalBackground', 'enchantedForest', 'mysticCave', 'celestialRealm'];
// Function to update the game background according to the current goal level
function updateBackground() {
var backgroundImageId = backgroundImages[goalLevel % backgroundImages.length];
- if (game.background) {
- var oldBackground = game.background;
- var fadeOutDuration = 1000; // Duration for the fade out in milliseconds
- var startTime = Date.now();
- var fadeStep = function fadeStep() {
- var currentTime = Date.now();
- var progress = (currentTime - startTime) / fadeOutDuration;
- oldBackground.alpha = 1 - progress; // Fade out
- if (progress < 1) {
- LK.setTimeout(fadeStep, 16);
- } else {
- oldBackground.destroy(); // Remove old background after fade out
- }
- };
- fadeStep();
- }
+ var oldBackground = game.background;
var background = LK.getAsset(backgroundImageId, {
anchorX: 0.5,
anchorY: 0.5
});
@@ -1957,12 +1942,16 @@
var progress = (currentTime - fadeInStartTime) / fadeInDuration;
background.alpha = progress; // Fade in
if (progress < 1) {
LK.setTimeout(fadeInStep, 16);
+ } else {
+ if (oldBackground) {
+ oldBackground.destroy();
+ }
}
};
fadeInStep();
- game.addChildAt(background, 0);
+ game.addChildAt(background, 1);
game.background = background;
}
// Initially set the background
updateBackground();
a magical landscape of wonder and joy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Magic, purple gem. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
glow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Hourglass icon white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Glow glare star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Shiny red envelope bao, chinese new years. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Magic greem gem in odd shape. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Flying unicorn fullbody sideview. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Magic Orange Gem. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Magic Blue Drop Shaped Gem. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
remove
Brilliant Gold Checkmark. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Magic diamond. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Enchanted forest. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Celestial reAlm. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Mystic cavern. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.