Code edit (3 edits merged)
Please save this source code
User prompt
when a pickup is within 200*200 distance squared from the player, the pickup becomes active, flying towards the player at a speed of 5
Code edit (4 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: parent.pickups is undefined' in this line: 'parent.pickups.push(new Pickup(parent, pickupX, pickupY));' Line Number: 53
User prompt
Add a Pickup class that can be collected by the player increasing the score by 1. These Pickups have a 10% chance of spawning when on a landscapeTile when it activates, adding to a pickups array and should move like the landscapeTiles.
Code edit (1 edits merged)
Please save this source code
User prompt
Add a score variable which is displayed in the top-center of the screen in black with a score icon to the left of it
User prompt
the score and score icon should be centered
User prompt
Add a score variable which is displayed in the top center of the screen in black and has a score icon next to it
User prompt
Fix Bug: 'ReferenceError: speedText is not defined' in this line: 'speedText.anchor.set(1, 0);' Line Number: 180
User prompt
Add a score variable and a PresentPickup class which can be collected by the player to increase their score by 1, the score is displayed in the top center of the screen in black and has a score icon next to it
Code edit (1 edits merged)
Please save this source code
User prompt
end the game if landscapeTile.checkCollision return true within the tick function
Code edit (22 edits merged)
Please save this source code
User prompt
in the checkCollision function, if the player is within reach of the landscapeTile, iterate through the obstructions and check if the player's hitbox intersects with the obstructions hitbox
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
After moving obstructions, check if their hitbox intersect the player hitbox and show a game over
User prompt
The player also has a 1x1 hitbox centered on the bottom
User prompt
all obstructions have a hitbox graphic, centered on the bottom of the graphic. These hitboxes have a width of the graphics and a height of half the width
User prompt
add black text to the top-right of the screen showing the current velocity as "Speed:"
Code edit (3 edits merged)
Please save this source code
User prompt
spawn a new obstacle below the bottom of the screen, with a random x position, every 100 distance traveled in the y direction
Code edit (1 edits merged)
Please save this source code
User prompt
velocity should scale based on the angle, with vertical being 100%, and horizonal being 0%
===================================================================
--- original.js
+++ change.js
@@ -256,8 +256,10 @@
}
for (var i = pickups.length - 1; i >= 0; i--) {
var pickup = pickups[i];
pickup.update(player);
+ pickup.x -= velocityX;
+ pickup.y -= velocityY;
if (pickup.y < -(tileSize / 2 + tileMargin) || pickup.active && player.hitbox.intersects(pickup.hitbox)) {
pickup.destroy();
pickups.splice(i, 1);
} else if (player.hitbox.intersects(pickup.hitbox)) {
Pixel art of a Santa. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a tree stump covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a dead tree covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a christmas tree covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a spruce tree covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a rock covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a christmas present counter. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a christmas present. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a blue christmas present. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art heart icon . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
two vertical lines with a blank background.
pixel art of a large, snow covered rock . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of skiis . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a floating grinch monster . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
single green firework explosion . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a wooden board covered in snow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a wooden pole with snow at it's base. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
tileable white water texture pixel art.