User prompt
stillnot working
User prompt
Drop gift package assets onto roof asset when the santaSleigh is above the roof.
User prompt
fix it
User prompt
Ensure that drop gift package assets onto roof asset when the santaSleigh is above the roof.
User prompt
Ensure that when the santaSleigh is above the roof drop gift package assets onto it
User prompt
game over when santaSleigh asset touch a roof asset
User prompt
Ensure that when the santaSleigh is toward a roof drop gift package assets onto it
User prompt
Ensure that when the santaSleigh is toward a roof drop gift packages assets onto it
User prompt
Play airplane sound when the airplane asset is on the map
User prompt
loop the wallpapper loading from right to left
User prompt
move wallpapper asset down by 1400 units
User prompt
move wallpapper asset down by 1300 units
User prompt
move wallpapper asset down by 1500 units
User prompt
move the wallpapper's center to the center bottom of the map
User prompt
move the center of the wallpapper to the center bottom of the map
User prompt
Add wallpapper asset to the map
User prompt
Add snowfalling animation to the map
User prompt
Move the santaSleigh right by 200 units
User prompt
Load the santaSleigh asset from the left top of the map at the game start
User prompt
Randomize airplane asset loading at the upper half of the map
User prompt
Set background to black
User prompt
Load just 1 roof asset at the same time and set load distance to 777 units
User prompt
load just 1 roof asset at the same time and set load distance to 1000 units
User prompt
Increase the distance between every roof assets to 1500 units
User prompt
Set background to black
/**** * Classes ****/ // Airplane class var Airplane = Container.expand(function () { var self = Container.call(this); var airplaneGraphics = self.attachAsset('airplane', { anchorX: 0.5, anchorY: 0.5 }); self.speed = -5; self.update = function () { self.x += self.speed; if (self.x < -airplaneGraphics.width / 2) { self.x = 2048 + airplaneGraphics.width / 2; } }; }); // Roof class var Roof = Container.expand(function () { var self = Container.call(this); var roofGraphics = self.attachAsset('roof', { anchorX: 0.5, anchorY: 0.5 }); self.speed = -5; self.update = function () { self.x += self.speed; if (self.x < -roofGraphics.width / 2) { self.x = 2048 + roofGraphics.width / 2; } }; }); //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Santa's Sleigh class var SantaSleigh = Container.expand(function () { var self = Container.call(this); var sleighGraphics = self.attachAsset('santaSleigh', { anchorX: 0.5, anchorY: 0.5 }); self.velocity = 0; self.gravity = 0.5; self.lift = -10; self.update = function () { self.velocity += self.gravity; self.y += self.velocity; if (self.y > 2732 - sleighGraphics.height / 2) { self.y = 2732 - sleighGraphics.height / 2; self.velocity = 0; } if (self.y < sleighGraphics.height / 2) { self.y = sleighGraphics.height / 2; self.velocity = 0; } }; self.flap = function () { self.velocity = self.lift; }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 // Black background }); /**** * Game Code ****/ // Initialize game elements var santaSleigh = game.addChild(new SantaSleigh()); santaSleigh.x = 400; santaSleigh.y = 1366; // Center vertically var roofs = []; var airplanes = []; // Create roofs for (var i = 0; i < 5; i++) { var roof = new Roof(); roof.x = 2048 + i * 400; roof.y = 2732 - 100; // Bottom of the screen roofs.push(roof); game.addChild(roof); } // Create airplane var airplane = new Airplane(); airplane.x = 2048; airplane.y = 200; // Upper half of the screen airplanes.push(airplane); game.addChild(airplane); // Handle game events game.down = function (x, y, obj) { santaSleigh.flap(); }; // Update game state game.update = function () { santaSleigh.update(); for (var i = 0; i < roofs.length; i++) { roofs[i].update(); if (santaSleigh.intersects(roofs[i])) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } } for (var j = 0; j < airplanes.length; j++) { airplanes[j].update(); if (santaSleigh.intersects(airplanes[j])) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } } };
/****
* Classes
****/
// Airplane class
var Airplane = Container.expand(function () {
var self = Container.call(this);
var airplaneGraphics = self.attachAsset('airplane', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = -5;
self.update = function () {
self.x += self.speed;
if (self.x < -airplaneGraphics.width / 2) {
self.x = 2048 + airplaneGraphics.width / 2;
}
};
});
// Roof class
var Roof = Container.expand(function () {
var self = Container.call(this);
var roofGraphics = self.attachAsset('roof', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = -5;
self.update = function () {
self.x += self.speed;
if (self.x < -roofGraphics.width / 2) {
self.x = 2048 + roofGraphics.width / 2;
}
};
});
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Santa's Sleigh class
var SantaSleigh = Container.expand(function () {
var self = Container.call(this);
var sleighGraphics = self.attachAsset('santaSleigh', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocity = 0;
self.gravity = 0.5;
self.lift = -10;
self.update = function () {
self.velocity += self.gravity;
self.y += self.velocity;
if (self.y > 2732 - sleighGraphics.height / 2) {
self.y = 2732 - sleighGraphics.height / 2;
self.velocity = 0;
}
if (self.y < sleighGraphics.height / 2) {
self.y = sleighGraphics.height / 2;
self.velocity = 0;
}
};
self.flap = function () {
self.velocity = self.lift;
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 // Black background
});
/****
* Game Code
****/
// Initialize game elements
var santaSleigh = game.addChild(new SantaSleigh());
santaSleigh.x = 400;
santaSleigh.y = 1366; // Center vertically
var roofs = [];
var airplanes = [];
// Create roofs
for (var i = 0; i < 5; i++) {
var roof = new Roof();
roof.x = 2048 + i * 400;
roof.y = 2732 - 100; // Bottom of the screen
roofs.push(roof);
game.addChild(roof);
}
// Create airplane
var airplane = new Airplane();
airplane.x = 2048;
airplane.y = 200; // Upper half of the screen
airplanes.push(airplane);
game.addChild(airplane);
// Handle game events
game.down = function (x, y, obj) {
santaSleigh.flap();
};
// Update game state
game.update = function () {
santaSleigh.update();
for (var i = 0; i < roofs.length; i++) {
roofs[i].update();
if (santaSleigh.intersects(roofs[i])) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
}
for (var j = 0; j < airplanes.length; j++) {
airplanes[j].update();
if (santaSleigh.intersects(airplanes[j])) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
}
};
Santa's sleigh with reindeers. profile view
Air coaching airplane at night, from profile view
snowflake
Photorealistic office house at New york night from front view.
Photorealistic and ultrawide panoramic landscape from New york at night.
gift package with christmas decor
Santa's face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.