Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: playerGraphics is not defined' in this line: 'playerGraphics.y = -self.rampHeight;' Line Number: 444
User prompt
The playerGraphics should be split into two distinct graphics playerFront and playerSide graphics. In the update function, if the angle is roughly pointing downwards, then set the front alpha to 1 and the side to 0, otherwise invert the alphas
Code edit (1 edits merged)
Please save this source code
User prompt
add a banner asset to the interface
User prompt
tint the heart black when losing it, in the interface
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
visually set the scoreIcon to be on the right of the scoreText
Code edit (5 edits merged)
Please save this source code
User prompt
in the game on tick, iterate through the pickupProjectileList and calling it's update statement
Code edit (4 edits merged)
Please save this source code
User prompt
create a pickupProjectile class that has an update function to move towards the player at a speed of 20
Code edit (1 edits merged)
Please save this source code
User prompt
when the pickup decor flips, randomly scale the decor's x to be between PICKUP_FLIP_SCALE and 1
Code edit (1 edits merged)
Please save this source code
User prompt
remove any console.logs
Code edit (11 edits merged)
Please save this source code
User prompt
ramps have a directional arrow indicator on top of them
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: PICKUP_TIL_SQRDIST is not defined' in this line: 'if (!tilted && distSqr <= PICKUP_TIL_SQRDIST) {' Line Number: 157
User prompt
Fix Bug: 'ReferenceError: PICKUP_TIL_SQRDIST is not defined' in this line: 'if (!tilted && distSqr <= PICKUP_TIL_SQRDIST) {' Line Number: 157
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: collectDist is not defined' in this line: 'var tiltDistSqr = collectDist * collectDist;' Line Number: 129
User prompt
when setting tilted = true in the pickup, adjust the pickupBase's graphic rotation to be between 5 and 20 degrees
===================================================================
--- original.js
+++ change.js
@@ -403,12 +403,13 @@
var rampRemaining = 0;
var rampDuration = 0;
var rampHeightMax = 0;
var playerShadow = self.createAsset('shadow', 'Player shadow', 0.5, 0.5);
- var platformGraphics = self.createAsset('platform', 'Platform image', 0.4, 0.5);
- var playerFront = self.createAsset('playerFront', 'Player front graphic', 0.45, 1);
- var playerSide = self.createAsset('playerSide', 'Player side graphic', 0.45, 1);
- var hitbox = self.createAsset('hitbox', 'Player Hitbox', 0.5, 0.5);
+ var playerContainer = self.addChild(new Container());
+ var platformGraphics = playerContainer.createAsset('platform', 'Platform image', 0.4, 0.5);
+ var playerFront = playerContainer.createAsset('playerFront', 'Player front graphic', 0.5, 1);
+ var playerSide = playerContainer.createAsset('playerSide', 'Player side graphic', 0.5, 1);
+ var hitbox = playerContainer.createAsset('hitbox', 'Player Hitbox', 0.5, 0.5);
playerShadow.alpha = 0.5;
playerShadow.scale.set(1.0, 0.6);
playerShadow.tint = 0x000000;
hitbox.width = 25;
@@ -459,13 +460,14 @@
travelDistY += velocityY;
self.distanceTravelled = Math.sqrt(travelDistX * travelDistX + travelDistY * travelDistY);
if (!self.airborne) {
var facingSide = targetPosition.x < self.x ? -1 : 1;
+ var imageAlpha = (self.speed === 0 || self.angle > Math.PI / 4 && self.angle < 3 * Math.PI) / 4 ? 1 : 0;
platformGraphics.rotation = self.angle;
playerFront.rotation = playerSide.rotation = totalSpeed * facingSide / PLAYER_TILT_SPEED_FACTOR;
playerFront.scale.x = playerSide.scale.x = facingSide;
- playerFront.alpha = self.angle > Math.PI / 4 && self.angle < 3 * Math.PI / 4 ? 1 : 0;
- playerSide.alpha = 1 - playerFront.alpha;
+ playerFront.alpha = imageAlpha;
+ playerSide.alpha = 1 - imageAlpha;
}
return {
velocityX,
velocityY
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 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 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.
pixel art of a red flag. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a red orb. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white
white
pixel art shape of a red arrow pointing downwards. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art banner of a pair of skis crossed. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white