Code edit (9 edits merged)
Please save this source code
User prompt
add an update function to the Interface class that takes in the player's `distanceTravelled` variable as a parameter, and displays (just the numerical value) the value to the right of the class
User prompt
Fix Bug: 'ReferenceError: DIFFICULTY_FACTOR_DIST is not defined' in this line: 'var newDensity = (1 + Math.pow(Math.log(player.distanceTravelled / DIFFICULTY_FACTOR_DIST + 2), 2)) / 100;' Line Number: 251
User prompt
Fix Bug: 'ReferenceError: MONSTER_SPAWN_DIST is not defined' in this line: 'if (player.distanceTravelled > MONSTER_SPAWN_DIST && Math.random() <= SPAWN_MONSTER_CHANCE) {' Line Number: 223
User prompt
Replace LandscapeTile's distanceFactor and monsterDistance variables with globals called DIFFICULTY_FACTOR_DIST and MONSTER_SPAWN_DIST respectively. Make sure to update all usages of these variables within the LandscapeTile class
Code edit (4 edits merged)
Please save this source code
User prompt
in the ramp update function, return true if the ramp's y becomes less than -200
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: rampList is undefined' in this line: 'rampList.push(landmark = self.parent.addChild(new Ramp(pointX, pointY)));' Line Number: 223
User prompt
Fix Bug: 'TypeError: rampList is undefined' in this line: 'rampList.push(landmark = self.parent.addChild(new Ramp(pointX, pointY)));' Line Number: 223
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: parent.addChild is not a function' in this line: 'parent.addChild(self);' Line Number: 342
Code edit (4 edits merged)
Please save this source code
User prompt
create a rampList variable, and iterate through each ramp, calling it's update function
Code edit (7 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: graphics is not defined' in this line: 'rampPillar.y = graphics.height;' Line Number: 320
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: playerGraphics is undefined' in this line: 'playerShadow.y = playerGraphics.height * 0.5;' Line Number: 366
User prompt
the player has a `shadow` asset underneath it
User prompt
ramps have a `rampShadow` asset underneath them
User prompt
ramps have a `rampPillar` asset underneath them
User prompt
if a landscape tile fails to create a pickup (in it's activate method), try create a ramp with a 5% chance
User prompt
add a ramp class with an update method that checks for a collision with the player
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -336,23 +336,25 @@
self.y -= velocityY;
return player.hitbox.intersects(self.hitbox);
}
});
-var Obstruction = Container.expand(function (parent, x, y, type) {
+var Obstruction = Container.expand(function (x, y, type) {
var self = Container.call(this);
- self.x = x;
- self.y = y;
var graphics = self.createAsset(type, 'Obstruction graphics', 0.5, 1);
var hitbox = self.createAsset('hitbox', 'Obstruction hitbox', 0.5, 0.5);
var randomScale = 0.9 + Math.random() * 0.2;
hitbox.y = -25;
hitbox.alpha = 0;
hitbox.width = graphics.width * 0.8;
hitbox.height = graphics.width * 0.45;
- self.scale.set(randomScale, randomScale);
+ ;
+ self.x = x;
+ self.y = y;
self.active = true;
self.hitbox = hitbox;
self.deactivate = deactivate;
+ self.scale.set(randomScale, randomScale);
+ ;
function deactivate() {
self.active = false;
graphics.alpha = 0.5;
}
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.