Code edit (11 edits merged)
Please save this source code
User prompt
Call Function07 when stage06BluePumpkin is pressed
User prompt
Create `Function07` in the code. It is responsible for instantiating `Stage07` and `Stage07BluePumpkin`. The function sets up these assets in the center of the playspace and adds an event listener to `stage06BluePumpkin` to call `destroyStageElements` when pressed.
Code edit (5 edits merged)
Please save this source code
User prompt
stage04 is sometimes blurry, fix it
Code edit (1 edits merged)
Please save this source code
User prompt
wait 1 second before playing sndbreathing
User prompt
do not show gripdemon when firstdemon is on screen
User prompt
instead of sndbreathing play sndgoat
User prompt
instead of snd_breathing play snd_goat
Code edit (1 edits merged)
Please save this source code
User prompt
make sure grip demon stays always on top even when new things are instantiated
User prompt
don't destroy grip demon
Code edit (8 edits merged)
Please save this source code
User prompt
remove secondbackground from the code
User prompt
destroy the background in the function to destroysplashscreenelements
User prompt
destroy the background in the function to destroysplashscreenelements
User prompt
i meant to wait two seconds before executing the destroy stage elements
User prompt
add to wait two seconds in destroy stage elements
User prompt
in function celeberation, also instantiate found and give it a celebratory animation for 1 second
User prompt
play celeberation when stage01bluepumpkin, stage02bluepumpkin, stage03bluepumpkin, stage04bluepumpkin and stage05bluepumpkin is pressed
User prompt
create a function called celebration, what it does is, play snd_found
Code edit (1 edits merged)
Please save this source code
User prompt
add instantiate secondbackground to function02
Code edit (1 edits merged)
Please save this source code
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
// Declare stages and stagePumpkins globally
var stage01;
var stage01BluePumpkin;
var stage02;
var stage02BluePumpkin;
var stage03;
var stage03BluePumpkin;
var stage04;
var stage04BluePumpkin;
var stage05;
var stage05BluePumpkin;
var stage06;
var stage06BluePumpkin;
// Function to destroy splash screen elements
function destroySplashScreenElements() {
if (splashScreen) {
splashScreen.destroy();
}
if (splashScreenPumpkin) {
splashScreenPumpkin.destroy();
}
if (splashScreenArrow) {
splashScreenArrow.destroy();
}
}
// Function to destroy Stage elements
function destroyStageElements() {
if (stage01) {
stage01.destroy();
}
if (stage01BluePumpkin) {
stage01BluePumpkin.destroy();
}
if (stage02) {
stage02.destroy();
}
if (stage02BluePumpkin) {
stage02BluePumpkin.destroy();
}
if (stage03) {
stage03.destroy();
}
if (stage03BluePumpkin) {
stage03BluePumpkin.destroy();
}
if (stage04) {
stage04.destroy();
}
if (stage04BluePumpkin) {
stage04BluePumpkin.destroy();
}
if (stage05) {
stage05.destroy();
}
if (stage05BluePumpkin) {
stage05BluePumpkin.destroy();
}
if (stage06) {
stage06.destroy();
}
if (stage06BluePumpkin) {
stage06BluePumpkin.destroy();
}
}
// Function01 to instantiate Stage01 and Stage01Pumpkin
function Function01() {
// Instantiate Stage01 in the center of the playspace
stage01 = LK.getAsset('Stage01', {
anchorX: 0.5,
anchorY: 0.5
});
stage01.x = 2048 / 2;
stage01.y = 2732 / 2 + 360;
game.addChild(stage01);
// Function02 to instantiate Stage02 and Stage02BluePumpkin
function Function02() {
// Instantiate Stage02 in the center of the playspace
stage02 = LK.getAsset('Stage02', {
anchorX: 0.5,
anchorY: 0.5
});
stage02.x = 2048 / 2;
stage02.y = 2732 / 2 + 360;
game.addChild(stage02);
// Instantiate Stage02BluePumpkin on the playspace
stage02BluePumpkin = LK.getAsset('Stage02BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage02BluePumpkin.x = 2048 / 2 - 925;
stage02BluePumpkin.y = 2732 / 2 - 890;
game.addChild(stage02BluePumpkin);
// Add event listener to stage02BluePumpkin to call destroyStage02Elements and Function03 on press
stage02BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
Function03();
};
}
// Instantiate Stage01Pumpkin on the playspace
stage01BluePumpkin = LK.getAsset('Stage01BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage01BluePumpkin.x = 2048 / 2 + 100;
stage01BluePumpkin.y = 2732 / 2 + 100;
game.addChild(stage01BluePumpkin);
// Add event listener to stage01Pumpkin to call destroyStage01Elements and Function02 on press
stage01BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
Function02();
};
}
// Instantiate the background in the center of the playspace
var background = LK.getAsset('Background', {
anchorX: 0.5,
anchorY: 0.5
});
background.x = 2048 / 2;
background.y = 2732 / 2;
game.addChild(background);
// Play and loop Halloween music
LK.playMusic('HalloweenMusic', {
loop: true
});
// Instantiate the splashscreenarrow on the playspace
var splashScreenArrow = LK.getAsset('SplashScreenArrow', {
anchorX: 0.5,
anchorY: 0.5
});
// Instantiate the splash screen in the center of the playspace
var splashScreen = LK.getAsset('SplashScreen', {
anchorX: 0.5,
anchorY: 0.5
});
splashScreen.x = 2048 / 2;
splashScreen.y = 2732 / 2 + 360;
game.addChild(splashScreen);
// Instantiate the splashscreenpumpkin on the playspace
var splashScreenPumpkin = LK.getAsset('SplashScreenPumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
splashScreenPumpkin.x = 2048 / 2 + 15;
splashScreenPumpkin.y = 2732 / 2 + 1020;
game.addChild(splashScreenPumpkin);
splashScreenArrow.x = 2048 / 2 + 400;
splashScreenArrow.y = 2732 / 2 + 910;
game.addChild(splashScreenArrow);
// Removed duplicate splashScreen instantiation
// Add event listener to splashScreenPumpkin to call destroySplashScreenElements on press
splashScreenPumpkin.down = function (x, y, obj) {
destroySplashScreenElements();
if (gripDemon) {
gripDemon.destroy();
}
Function01();
};
// Animate splashScreenPumpkin to bob up and down slowly
var bobDirection = 1;
var bobSpeed = 0.1;
var bobRange = 5;
var originalY = splashScreenPumpkin.y;
LK.setInterval(function () {
splashScreenPumpkin.y += bobSpeed * bobDirection;
if (splashScreenPumpkin.y > originalY + bobRange || splashScreenPumpkin.y < originalY - bobRange) {
bobDirection *= -1;
}
}, 1000 / 60); // 60 FPS
// Instantiate GripDemon in the center of the playspace
var gripDemon = LK.getAsset('GripDemon', {
anchorX: 0.5,
anchorY: 0.5
});
gripDemon.x = 2048 / 2;
gripDemon.y = 2732 / 2 - 1300;
game.addChild(gripDemon);
// Function03 to instantiate Stage03 and Stage03BluePumpkin
function Function03() {
// Instantiate Stage03 in the center of the playspace
stage03 = LK.getAsset('Stage03', {
anchorX: 0.5,
anchorY: 0.5
});
stage03.x = 2048 / 2;
stage03.y = 2732 / 2 + 360;
game.addChild(stage03);
// Instantiate Stage03BluePumpkin on the playspace
stage03BluePumpkin = LK.getAsset('Stage03BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage03BluePumpkin.x = 2048 / 2 + 950;
stage03BluePumpkin.y = 2732 / 2 + 390;
game.addChild(stage03BluePumpkin);
// Add event listener to stage03BluePumpkin to call destroyStageElements on press
stage03BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
// Instantiate FirstDemon in the center of the playspace
var firstDemon = LK.getAsset('FirstDemon', {
anchorX: 0.5,
anchorY: 0.5
});
firstDemon.x = 2048 / 2;
firstDemon.y = 2732 / 2;
game.addChild(firstDemon);
LK.stopMusic();
LK.getSound('sndBreathing').play();
// Function04 to instantiate Stage04 and Stage04BluePumpkin
function Function04() {
// Instantiate Stage04 in the center of the playspace
stage04 = LK.getAsset('Stage04', {
anchorX: 0.5,
anchorY: 0.5
});
stage04.x = 2048 / 2;
stage04.y = 2732 / 2 + 360;
game.addChild(stage04);
// Instantiate Stage04BluePumpkin on the playspace
stage04BluePumpkin = LK.getAsset('Stage04BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage04BluePumpkin.x = 2048 / 2 - 70; // Example position
stage04BluePumpkin.y = 2732 / 2 + 790; // Example position
game.addChild(stage04BluePumpkin);
// Add event listener to stage04BluePumpkin to call destroyStageElements and Function05 on press
stage04BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
Function05();
};
}
// Function05 to instantiate Stage05 and Stage05BluePumpkin
function Function05() {
// Instantiate Stage05 in the center of the playspace
stage05 = LK.getAsset('Stage05', {
anchorX: 0.5,
anchorY: 0.5
});
stage05.x = 2048 / 2;
stage05.y = 2732 / 2 + 360;
game.addChild(stage05);
// Instantiate Stage05BluePumpkin on the playspace
stage05BluePumpkin = LK.getAsset('Stage05BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage05BluePumpkin.x = 2048 / 2 - 205; // Example position
stage05BluePumpkin.y = 2732 / 2 - 500; // Example position
game.addChild(stage05BluePumpkin);
// Add event listener to stage05BluePumpkin to call destroyStageElements and Function06 on press
stage05BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
Function06();
};
}
// Function06 to instantiate Stage06 and Stage06BluePumpkin
function Function06() {
// Instantiate Stage06 in the center of the playspace
stage06 = LK.getAsset('Stage06', {
anchorX: 0.5,
anchorY: 0.5
});
stage06.x = 2048 / 2;
stage06.y = 2732 / 2 + 360;
game.addChild(stage06);
// Instantiate Stage06BluePumpkin on the playspace
stage06BluePumpkin = LK.getAsset('Stage06BluePumpkin', {
anchorX: 0.5,
anchorY: 0.5
});
stage06BluePumpkin.x = 2048 / 2 + 800; // Example position
stage06BluePumpkin.y = 2732 / 2 - 900; // Example position
game.addChild(stage06BluePumpkin);
// Add event listener to stage06BluePumpkin to call destroyStageElements on press
stage06BluePumpkin.down = function (x, y, obj) {
destroyStageElements();
// You can add further actions here if needed
};
}
// Add event listener to FirstDemon to call Function04, restart music, and destroy self on press
firstDemon.down = function (x, y, obj) {
Function04();
LK.playMusic('HalloweenMusic', {
loop: true
});
firstDemon.destroy();
};
};
}
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
yellow star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon old splintered wood background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
demon goat staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark cartoon cloudy skies high quality background make it simple and minimalistic.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
demon dog staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish lake environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish lake environment. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
scary demon staring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Generate a high quality cartoon background Halloween image on a black canvas similar to the format of where is waldo with a hellish environment filled with pumpkins. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an orange halloween pumpkin with glasses Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
button that says relax in orange, black outline of the letters. high contrast. has a pumpkin on it Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
button that says race in orange, black outline of the letters. high contrast. has a pumpkin on it square button with rounded corners Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. png background
coming soon letters in white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Round Black Ellipse with a Transparent Hole in the Middle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.