User prompt
Everytime i touch the screen, santa should move for a second to the top, then move down to his basic-y-position.
User prompt
Everytime i touch the screen, santa should move for a second to the top, if the player touched a higher y-position. Or to a lower position, if the player touched a lower y-position
User prompt
Increase the maximun y-spawn position of clouds by 100
User prompt
Give the clouds a random opacity between 0.5 - 1
User prompt
Spawn each 1-3 seconds a cloud
User prompt
Spawn them each 3-5 seconds
User prompt
Make clouds 500% bigger
User prompt
Add a cloud class. Spawn clouds randomly the the mid-y till top-position. Move the clouds to the left and destroy them, when they leave the screen. Add a cloud each 5-10 seconds. They should have a random movement.
User prompt
Delete presents, when they leave the screen
User prompt
Add a garbage collector, so the game will not longer lag after a while
User prompt
Satisfied chimneys will also move down.
User prompt
presents will not longer destroyed, if collided with a satisfied chimney
User prompt
Give chimneys the satisfied variable. Its a boolean with start as false. It get true, if the chimney got collided with a present
User prompt
Destroy the chimneys after they collided with a present after 1 second.
User prompt
These chimneys, who got hit should move to a lower position, before the get destroyed
User prompt
Move the chimneys to the bottom, when they got hit. Then destroys them.
User prompt
They still dont move you idiot
User prompt
This blocked chimneys dont move. But they should move!!!!!!
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self.parent.addChild')' in this line: 'self.parent.addChild(blockedChimney);' Line Number: 56
User prompt
Change chimneys to blocked chimneys, if a present hit them. This chimneys still move to tge left
User prompt
Fix Bug: 'ReferenceError: Can't find variable: Chimney' in this line: 'if (chimneys[j] instanceof Chimney) {' Line Number: 69
User prompt
Fix Bug: 'Timeout.tick error: Can't find variable: Chimney' in this line: 'var chimney = new Chimney();' Line Number: 54
User prompt
Change chimneys to blocked chimneys, if a present hit them. This blocked chimneys have the same values and methods
User prompt
Dude delete code line 51, line 52 and line 53
User prompt
Delete line 51 till 53
var Santa = Container.expand(function () { var self = Container.call(this); var santaGraphics = self.createAsset('santa', 'Santa Graphics', .5, .5); santaGraphics.scale.set(4.5); self.move = function (direction) { var speed = 8.75; self.x += direction * speed; }; self.throwPresent = function () { if (this.canThrow) { this.canThrow = false; LK.setTimeout(function () { self.canThrow = true; }, 500); } }; self.canThrow = true; }); var Present = Container.expand(function () { var self = Container.call(this); var presentGraphics = self.createAsset('present', 'Present Graphics', .5, .5); self.fall = function () { var gravity = 14; self.y += gravity; }; }); var Chimney = Container.expand(function () { var self = Container.call(this); self.satisfied = false; var chimneyGraphics = self.createAsset('chimney', 'Chimney Graphics', .5, .5); chimneyGraphics.scale.y *= 1.5 * 1.75; self.speed = -5; self.moveAndCheckBounds = function () { if (!self.satisfied) { self.x += self.speed; } else { self.y += 5; } if (self.x < -chimneyGraphics.width || self.y > 2732) { self.destroy(); } }; self.checkCollision = function (present) { if (self.intersects(present) && present.y >= self.y - self.height / 2 && present.y <= self.y && !self.satisfied) { self.satisfied = true; present.destroy(); LK.setTimeout(function () { self.satisfied = true; self.destroy(); }, 1000); self.satisfied = true; } }; }); var Game = Container.expand(function () { var self = Container.call(this); var santa = self.addChild(new Santa()); santa.x = 2048 / 2; santa.y = 2732 / 2; var presents = []; var chimneys = []; var chimneySpawnX = 2048; var chimneySpawnY = 2732 - 100; LK.setInterval(function () { var chimney = new Chimney(); chimney.x = chimneySpawnX; chimney.y = chimneySpawnY; chimneys.push(chimney); self.addChild(chimney); }, 2000); LK.on('tick', function () { var direction = touchPosition > santa.x ? 1 : -1; santa.move(direction); for (var i = 0; i < presents.length; i++) { presents[i].fall(); } for (var j = 0; j < chimneys.length; j++) { chimneys[j].moveAndCheckBounds(); for (var i = 0; i < presents.length; i++) { chimneys[j].checkCollision(presents[i]); } if (chimneys[j].x < -chimneys[j].width) { chimneys.splice(j, 1); j--; } } }); var touchPosition = santa.x; stage.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); touchPosition = pos.x; if (santa.canThrow) { var present = new Present(); present.x = santa.x; present.y = santa.y + 100; presents.push(present); self.addChild(present); santa.throwPresent(); } }); });
===================================================================
--- original.js
+++ change.js
@@ -30,20 +30,26 @@
var chimneyGraphics = self.createAsset('chimney', 'Chimney Graphics', .5, .5);
chimneyGraphics.scale.y *= 1.5 * 1.75;
self.speed = -5;
self.moveAndCheckBounds = function () {
- self.x += self.speed;
- if (self.x < -chimneyGraphics.width) {
+ if (!self.satisfied) {
+ self.x += self.speed;
+ } else {
+ self.y += 5;
+ }
+ if (self.x < -chimneyGraphics.width || self.y > 2732) {
self.destroy();
}
};
self.checkCollision = function (present) {
if (self.intersects(present) && present.y >= self.y - self.height / 2 && present.y <= self.y && !self.satisfied) {
self.satisfied = true;
present.destroy();
LK.setTimeout(function () {
+ self.satisfied = true;
self.destroy();
}, 1000);
+ self.satisfied = true;
}
};
});
var Game = Container.expand(function () {
A lazy santa clause on his sleigh with reindeers. 2d cartoon, side view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A christmas present, cartoon 2d, side view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A chimney, cartoon 2d, side view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d cartoon cloud, side view, game asset Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d cartoon of a lonely snowflake, sideview Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
evil flying cartoon raven, sideview, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon of a christmas present, evil raven style, side view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Froozen beard, cartoon, sideview Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Little brat on a sledge, girl, cartoon, winter, sideview, evil Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Little girl on a sledge, cartoon, winter, sideview, evil, winter boots Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
super christmas present, golden, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for santas cold resistence, cartoon, with the text: „Cold Resistence“ at top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for premium christmas delivery, cartoon, with the text: „Premium Delivery“ at top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for santa throwing a snowball, cartoon, with the text: „Snowball Master“ at top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
christmas present for kind santa, cartoon, power up Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
christmas present for naughty santa, cartoon, power up Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a Snowball machine on the back of santas sledge, cartoon, with the text „snowball machine“ on the top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for santa crow, on a circle, with the text „santa crow“ at top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament with a golden present at top, at the bottom there is the text: "Each tenth point you have the change to get a super Present, make sure naughty points are equal to kind points"
a pergament button with the Text: "OK"; 2 d game asset
a pergament with a raven stealing a christmas present on the top. At the bottom is the text: "Not only are ravens happy to receive gifts and are appeased by them, they also like to give the gift back... with deadly intent."
a pergament with a raven hit by a snowball on the top. At the bottom is the text: "Ravens may be naughty to deserve a snowball, but you should know, Ravens never forget!"
blue electricity in the sky cartoon, 2d
Icon for santa moving through walls, on a circle, with the text „transcendence“ at top, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a very speedy icicle, on a circle, with the text „pointed Icicle“ at top, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a froozen christmas present, on a circle, with the text „icy Surprise“ at top, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a explosive present, on a circle, with the text „detonating wrapping paper“ at top, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a mechanical arm, on a circle, with the text „Santa Ballista 360“ at top, cartoon, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a electified snowball, on a circle, with the text „Thunderball“ at top, cartoon, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
exclamation mark in the shape of a candy cane Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a snowball hitting a present in the sky, on a circle, with the text „Snowball Delivery“ at top, cartoon, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Icon for a santa as a storm king on a circle, with the text „Storm King“ at top, cartoon, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament with a present throwed by someone into a basket at top, at the bottom there is the text: "There are many ways of how can throw a present. Let it just fall or throw it like a basketball."
a pergament with a snowball and two clouds, in one cloud is a powerful shield hidden, in a other cloud is a grinding grinch with a bomb. There is the text: "Everything can be hidden in the clouds. Throw a snowball to see what is there."
a pergament with santa on a sledge and his flying reindeers throwing a snowball to a raven. There is the text: "Its easier to hit something from above than below. Thanks to gravity."
a pergament with a freezing santa on a sledge in the sky. There is the text: "using the stationary mode is useful, but only movement will warm you up"
a pergament with a flying santa on his sledge hiding for ravens and storms. In front of him is a chimney. There is the text: "Flying low can save you from the birds and bad weather, but there are dangers too"
a pergament with Klaus and Jesper from the movie Klaus. There is the text: "A true selfless act always sparks another. -Klaus"
a pergament of a christmas present with a box glove trap. There is the text: "You think, the hit box is confusing? Thank you for your information. You get a present for this."
Icon for a snowball collide with snoflakes and becomes bigger, on a circle, with the text „ASSIMILATING SNOW“ at top, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Epic background of a grinch village in the mountains, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a electrified destroyed christmas present, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
raven with christmas hat and colorful scarf got hit by a snowball in the air, he is shocked, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament of a christmas present hit by a storm lightning in the sky. There is the text: "Gifts are not guaranteed to withstand storm damage."
a pergament of a Santa Clause on his sledge with reindeers in the sky. He holds a scepter of candy cane. There is the text: "Click on Santa for a short duration to use the KeeperMode."
a pergament of a happy girl. she got a big fat slimy bug as chrismas present. There is the text: "If you find a bug, you cam write me a message on Discord FRVR. - Sasbe"
a pergament of Santa Clause on his flying sledge with reindeers, he flees for ravens and leaves a big frosty cloud behind him. There is the text "In Keeper Mode, you can touch santa and swipe your finger into the direction you want to move with extra speed"
a pergament of many snowflakes in the sky. With a high good Karma Counter. There is the text "high karma is a guarantee for a white christmas... and a slowly workday"
icon of a weatherproof christmas present flying in the sky, on a circle, cartoon. With the text: "weatherproof packaging" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
epic landscape intro in the clouds. cartoon 2d style. It has the title: "Saint Karma"
a very deadly and sharp snowflake with skull shape, red, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a golden snowflake, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a snowball with magical powder, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a snowball with magical powder, white color with golden tone, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
snow powder in the sky, pixel Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
frozen golden beard, only beard, cartoon, side view Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a smartphone, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a PC, christmas style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
icon for a golden snowflake, on a circle, on the top is the text: "golden snowflakes" cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
There is the text: "there are many ways zo beat a highscore, but can you also beat all in once?" On a pergament with many highscores called good, bad, max, min and diff.
icon for santa with a thick warm coat, but his face is very cold, on a circle, with the text at top: "warming coat", cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a snowball with red power, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white snowball with some blue glue, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
flying envelope with wings, christmas style, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament letter with the name "Deadly Snow". It has a snowflake in shape of a skull on it. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament letter with the name "Bad Nuts". It has a evil looking little girl brat with a ponytail on a sledge on it. vertical. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament letter with the name "Very cloudy". It has a big cloud on it. vertical. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the text "freezing circumstances", in a old font
a speech bubbly with a question mark, cartoon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pergament of Santa hiding with his flying sleigh and reindeers in a cloud. There is the text "In clouds you are protected from enemy attention."
a pergament of santa catching a flying envelope in the sky. There is the text "Catch any flying envelopes in the sky. Otherwise the evil forces will become stronger."
frame made of sharp ice, it fill the complete screen, in the center is black only
frame made of cozy clouds, it fill the complete screen, in the center is black only, on black background
frame made of dark clouds, some blue sparks, it fill the complete screen, in the center is white only, on white background
a pergament letter with the name "Replicating Snow". It has a cloud with replicating snowflakes on it. vertical. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a little bell Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a red nut hidden in a snowball, side view, cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.