User prompt
make chimneys spawn more frequently but do it with an random interval of 2 seconds
User prompt
remove the function that spawns a new chimney everytime a present touches it
User prompt
bind the presents spawn point to the x coordinate of the sleigh
User prompt
make present spawn on mouse click, dont change anything else
User prompt
make presents spawn on mouse click, keep the same logic
Code edit (1 edits merged)
Please save this source code
User prompt
make gifts spawn on mouse down (keep the same logic)
User prompt
gifts should be spawned from the center of the santa asset
User prompt
the max speed should be faster
User prompt
give the santa a max speed
User prompt
the sleigh should follow the mouse even when it is not clicked
User prompt
the santa asset should follow the x position of the mouse but with a slight delay
User prompt
place the santa in front of the clouds
User prompt
place the santa in front of the clouds
User prompt
place santa on y=300, it should follow the x coordinate of the mous but with a max speed of 2 (so there is a slight delay
User prompt
add a santa in sleigh asset
User prompt
make the cloud asset move with the same speed of the chimneys. if the cloud asset reaches the end of the screen make a new one at the right of the screen
User prompt
spawn a new cloud when the right of the asset is visible on the game
User prompt
make it so the right of the clouds asset is always touching the left of another one
User prompt
make the cloud asset move with the same speed of the chimneys. if it reaches the end of the screen make a new one at the right of the screen
User prompt
remove cloud asset
User prompt
make the sky asset move with the same speed of the chimneys
User prompt
make an clouds asset, move it behind the chimneys. place it in the middle of the screen
User prompt
gifts should move faster downwards
User prompt
gifts should move faster
===================================================================
--- original.js
+++ change.js
@@ -4,9 +4,12 @@
self.targetX = mouseX;
};
self.move = function () {
var delayFactor = 0.1;
- self.x += (self.targetX - self.x) * delayFactor;
+ var maxSpeed = 5;
+ var moveAmount = (self.targetX - self.x) * delayFactor;
+ moveAmount = Math.max(Math.min(moveAmount, maxSpeed), -maxSpeed);
+ self.x += moveAmount;
};
var santaSleighGraphics = self.createAsset('santaSleigh', 'Santa in sleigh', .5, .5);
self.targetX = self.x;
});
chimney. pixelart. residential chimney. only chimney. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift. pixelart. christmas. green and red. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
night sky. pixelart. seamless. clouds. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart. christmas. santa in sleigh. from the side. flying. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
grinch. green monster. pixelart. only face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart. chistmas present. powerup. game art Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.