User prompt
reduce the speed of santa a bit more
User prompt
reduce the speed of santa a bit more
User prompt
reduce the movement speed of santa a bit more
User prompt
reduce the movemet speed of santa a bit more
User prompt
reduce the speed wich santa can move a bit
User prompt
move a bit left then a bit right Santa's image on its axis while moving
User prompt
santa appears in the middle
User prompt
rotate quickly on it's axis santas image while moving
var Ground = Container.expand(function () {
	var self = Container.call(this);
	var groundGraphics = self.createAsset('ground', 'Ground image', 0, 1);
	groundGraphics.width = 2048;
	self.addChild(groundGraphics);
});
var Snowflake = Container.expand(function (santa) {
	var self = Container.call(this);
	self.santa = santa;
	var snowflakeGraphics = self.createAsset('snowflake', 'Snowflake icon', 0.5, 0.5);
	snowflakeGraphics.scale.set(0.5);
	self.drop = function () {
		self.y += 5;
		self.x -= 5;
		if (self.y > 2732 - self.santa.height || self.x < -self.width) {
			self.destroy();
		}
	};
});
var GrayHeart = Container.expand(function () {
	var self = Container.call(this);
	var grayHeartGraphics = self.createAsset('grayHeart', 'Gray Heart icon', 0, 0);
});
var Heart = Container.expand(function () {
	var self = Container.call(this);
	var heartGraphics = self.createAsset('heart', 'Heart icon', 0, 0);
});
var Santa = Container.expand(function () {
	var self = Container.call(this);
	var santaGraphics = self.createAsset('santa', 'Santa character', .5, .5);
	self.lastX = self.x;
	self.move = function (newX) {
		var halfWidth = this.width / 2;
		var oldX = this.x;
		var moveAmount = Math.max(halfWidth, Math.min(2048 - halfWidth, newX)) - this.x;
		this.x += moveAmount * 0.2;
		if (oldX > this.x) {
			this.scale.x = 1;
		} else if (oldX < this.x) {
			this.scale.x = -1;
		}
		self.lastX = this.x;
	};
	self.collect = function () {};
});
var Gift = Container.expand(function (dropSpeed) {
	var self = Container.call(this);
	self.dropSpeed = dropSpeed;
	var giftGraphics = self.createAsset('gift', 'Gift item', .5, .5);
	self.drop = function () {
		self.y += self.dropSpeed;
		var wiggle = (Math.random() - 0.5) * 10;
		self.x += wiggle;
		self.x = Math.max(self.width / 2, Math.min(2048 - self.width / 2, self.x));
	};
});
var Game = Container.expand(function () {
	var self = Container.call(this);
	var score = 0;
	var highestScore = 0;
	var scoreTxt = new Text2(score.toString(), {
		size: 150,
		fill: "#ffffff"
	});
	scoreTxt.anchor.set(.5, 0);
	LK.gui.topCenter.addChild(scoreTxt);
	var lives = 3;
	var hearts = [];
	for (var i = 0; i < lives; i++) {
		var heart = new Heart();
		heart.x = i * (heart.width + 10);
		heart.y = 10;
		hearts.push(heart);
		LK.gui.topLeft.addChild(heart);
	}
	var santa = self.addChild(new Santa());
	var snowflakes = [];
	for (var i = 0; i < 10; i++) {
		var initialSnowflake = new Snowflake(santa);
		initialSnowflake.x = Math.random() * 2048;
		initialSnowflake.y = Math.random() * 2732;
		snowflakes.push(initialSnowflake);
		self.addChild(initialSnowflake);
	}
	var snowfallInterval = LK.setInterval(function () {
		for (var i = 0; i < 3; i++) {
			var snowflake = new Snowflake(santa);
			snowflake.x = 2048 + snowflake.width / 2;
			snowflake.y = Math.random() * 2732;
			snowflakes.push(snowflake);
			self.addChild(snowflake);
		}
	}, 1000);
	var gifts = [];
	santa.x = 2048 / 2;
	santa.y = 2732 - santa.height;
	var ground = new Ground();
	var background = self.createAsset('background', 'Background image', 0, 0);
	background.width = 2048;
	background.height = 2732 - ground.height;
	self.addChildAt(background, 0);
	self.addChildAt(ground, 1);
	var giftDropSpeed = 5;
	var maxGiftDropSpeed = 15;
	var giftSpeedIncreaseInterval = 10000;
	var lastSpeedIncreaseTime = 0;
	var giftCreationInterval = LK.setInterval(function () {
		var currentTime = Date.now();
		if (currentTime - lastSpeedIncreaseTime >= giftSpeedIncreaseInterval && giftDropSpeed < maxGiftDropSpeed) {
			giftDropSpeed += 1;
			lastSpeedIncreaseTime = currentTime;
		}
		var gift = new Gift(giftDropSpeed);
		gift.x = Math.random() * 2048;
		gift.y = 0;
		gifts.push(gift);
		self.addChild(gift);
	}, 2000);
	LK.on('tick', function () {
		santa.move();
		for (var j = 0; j < snowflakes.length; j++) {
			snowflakes[j].drop();
			if (snowflakes[j].y > 2732) {
				snowflakes.splice(j, 1);
				j--;
			}
		}
		for (var i = 0; i < gifts.length; i++) {
			gifts[i].drop();
			if (santa.intersects(gifts[i])) {
				santa.collect(gifts[i]);
				score++;
				if (score > highestScore) {
					highestScore = score;
				}
				scoreTxt.setText(score.toString());
				gifts[i].destroy();
				gifts.splice(i, 1);
				i--;
				if (hearts.length > 0) {
					var lostHeart = hearts[hearts.length - 1];
				}
			} else if (gifts[i].y > 2732 - ground.height - gifts[i].height / 2) {
				gifts[i].destroy();
				gifts.splice(i, 1);
				i--;
				if (--lives <= 0) {
					if (hearts.length > 0) {
						var lostHeart = hearts.pop();
						lostHeart.destroy();
						var grayHeart = new GrayHeart();
						grayHeart.x = lostHeart.x;
						grayHeart.y = lostHeart.y;
						LK.gui.topLeft.addChild(grayHeart);
					}
					scoreTxt.setText('Highest Score: ' + highestScore.toString());
					LK.showGameOver();
				} else if (hearts.length > 0) {
					var lostHeart = hearts.pop();
					lostHeart.destroy();
					var grayHeart = new GrayHeart();
					grayHeart.x = lostHeart.x;
					grayHeart.y = lostHeart.y;
					LK.gui.topLeft.addChild(grayHeart);
				}
			}
		}
	});
	stage.on('down', function (obj) {
		var pos = obj.event.getLocalPosition(self);
		santa.move(pos.x);
	});
	stage.on('move', function (obj) {
		var pos = obj.event.getLocalPosition(self);
		santa.move(pos.x);
	});
});
 ===================================================================
--- original.js
+++ change.js
@@ -32,9 +32,9 @@
 	self.move = function (newX) {
 		var halfWidth = this.width / 2;
 		var oldX = this.x;
 		var moveAmount = Math.max(halfWidth, Math.min(2048 - halfWidth, newX)) - this.x;
-		this.x += moveAmount * 0.3;
+		this.x += moveAmount * 0.2;
 		if (oldX > this.x) {
 			this.scale.x = 1;
 		} else if (oldX < this.x) {
 			this.scale.x = -1;
:quality(85)/https://cdn.frvr.ai/6570c1802938de4061da71d2.png%3F3) 
 Pixelated Santa Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570c3172938de4061da71da.png%3F3) 
 pixeled Christmas present Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570cd772938de4061da71ff.png%3F3) 
 pixalated heart empty Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570cda82938de4061da7206.png%3F3) 
 pixalated heart grey Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570d5dbd49dc189162a5bc1.png%3F3) 
 pixelated snow flake Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570df52a56ea91606a9c484.png%3F3) 
 snowy ground image pixalated Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6570dfd7a56ea91606a9c48f.png%3F3) 
 snowy ground image pixalated 2D Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/6571097da56ea91606a9c5c0.png%3F3) 
 pixel art a small image 2048 to serve as ground that has snow for a simple 2D game no trees not nothing only snow and ground to cover the ground width of the screen Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
:quality(85)/https://cdn.frvr.ai/65711b3aa56ea91606a9c668.png%3F3) 
 gif pixel art for game background, snow on the ground, houses in the far background and moonligh, trees on the left and right, cozy Christmas atmosphere Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.