Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
make this line work: ballGraphics.texture = LK.getAsset('newDeathSpriteId', {}).texture;
User prompt
Fix Bug: 'TypeError: ballGraphics.setTextureFromAsset is not a function' in or related to this line: '_iterator.f();' Line Number: 429
User prompt
Fix Bug: 'TypeError: ballGraphics.setTexture is not a function' in or related to this line: '_iterator.f();' Line Number: 429
User prompt
in the deathanim function, ball sprite should change to another one.
Code edit (10 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: '_iterator.f();' Line Number: 466
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: '_iterator.f();' Line Number: 466
Code edit (1 edits merged)
Please save this source code
User prompt
Every time the player gets points, they should be multiplied by the variable (multiplier-1).
User prompt
Every time the player gets points, they should be multiplied by the variable (multiplier-1).
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'toString')' in or related to this line: 'mulText.setText('x' + newVal.toString());' Line Number: 176
User prompt
Fix Bug: 'ReferenceError: valText is not defined' in or related to this line: 'valText.anchor.set(0.5, 0.5);' Line Number: 173
Code edit (3 edits merged)
Please save this source code
User prompt
scorelabels should fly off in a random upwards direction instead of just up.
Code edit (1 edits merged)
Please save this source code
User prompt
add all created scorelabels to the scoreLabels array on creation.
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'self.scoreLabel.update();' Line Number: 323
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'self.scoreLabel.update();' Line Number: 323
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -38,30 +38,28 @@
Now that player graphic is bigger, it sometimes collides with platforms from below. Either adjust size, spacing
or jump height/logic.
The platforms array grows in length over time. Try to remove deleted elements from it, but make backup first,
because this is where the AI started optimizing to make the game page freeze last time.
+Player should have three lives - shown as little red hearts in top right corner.
---------------------
Interface/graphics:
Show instructions on screen at start.
-When player dies, maybe make them fall out of screen, facing player, screaming, waving hands, like in the old
-Rick Dangerous games for Amiga.
--------------
Powerup ideas:
A powerup that removes all nearby platforms and give score for them.
Maybe make a disco powerup that changes light, colors or visuals somehow.
Consider platforms that increase or decrease the size/weight of the character.
Or maybe just a platform with a piece of cake on it, and when player lands there he gets 10 points and swells up
(no gameplay side effects) for 5 seconds. Could actually be all kinds of funny pickups like that.
-A beer that inverses controls (but again, players will be frustrated by rapid changes)
-Or different hats that the player will wear until a new one is picked up?
+Different hats that the player will wear until a new one is picked up?
----------
Gameplay:
Consider difficulty ramping. More red platforms?
Make sure red platforms never fully block the way. Probably means platforms should have row-id's, so rows can be checked.
-----------
Theming:
-Consider appropriate player character.
-A frog? A kangaroo? A spring? A tennisball? A rabbit? A two-headed squirrel? A something on a pogostick?
+Consider possible player character.
+A frog? A kangaroo? A spring? A tennisball? A rabbit? A two-headed squirrel? Something on a pogostick?
A Rick Dangerous finding treasures on the platforms?
A Pirate Ship finding bounty on platforms? Maybe beats platforms with less strength than they have?
A cat eating sushi on each platform?
A princess saving animals on every tenth platform?
@@ -81,8 +79,9 @@
scoreText.setText(newScore.toString());
};
self.updateScore(0); // Initialize with 0 score
});
+/*
var DepthLabel = Container.expand(function () {
var self = Container.call(this);
var depthText = new Text2('0', {
size: 75,
@@ -94,9 +93,9 @@
self.updateDepthLabel = function (newDepth) {
depthText.setText(maxDepth.toString());
};
self.updateDepthLabel(0); // Initialize with 0 score
-});
+});*/
// Platform class to create movable platforms
var Platform = Container.expand(function () {
var self = Container.call(this);
var platformGraphics = self.attachAsset('platform', {
@@ -151,15 +150,18 @@
self.collidable = true;
self.velocityBoost = 25;
self.immunityBoost = 0;
self.scoreBoost = 1;
+ self.rotation = Math.PI / 4;
+ /*
var mulText = new Text2('+1', {
size: 50,
fill: "#ffffff",
outline: true
});
mulText.anchor.set(0.5, 0.5);
self.addChild(mulText);
+ */
});
var PowerupFollow = Container.expand(function () {
var self = Container.call(this);
var powerupFollowGraphics = self.attachAsset('powerupFollow', {
@@ -281,16 +283,16 @@
self.velocityBoost = 25;
self.immunityBoost = 0;
self.scoreBoost = 0;
var valText = new Text2('0', {
- size: 50,
+ size: 43,
fill: "#000000",
outline: true
});
valText.anchor.set(0.5, 0.5);
self.addChild(valText);
self.updateLabel = function (newVal) {
- valText.setText(self.scoreVal.toString());
+ valText.setText('x' + self.scoreVal.toString());
self.scoreBoost = newVal;
};
self.updateLabel(self.scoreVal);
});
@@ -378,8 +380,9 @@
self.attachAsset('newDeathSpriteId', {
anchorX: 0.5,
anchorY: 0.5
});
+ LK.effects.flashObject(ball.getChildAt(0), '0xff0000', 1000);
self.fallingActivated = true;
gameEnding = true;
//ballGraphics.texture = LK.getAsset('newDeathSpriteId', {}).texture;
//LK.showGameOver();
@@ -441,9 +444,9 @@
}
playerScoreLabel.updateScore(LK.getScore());
if (platform.row > maxDepth) {
maxDepth = platform.row;
- maxDepthLabel.updateDepthLabel(maxDepth);
+ //maxDepthLabel.updateDepthLabel(maxDepth);
}
}
}
}
@@ -575,10 +578,10 @@
var gameEnding = false;
// Create player score label
var playerScoreLabel = new PlayerScoreLabel();
LK.gui.top.addChild(playerScoreLabel);
-var maxDepthLabel = new DepthLabel();
-LK.gui.topRight.addChild(maxDepthLabel);
+//var maxDepthLabel = new DepthLabel();
+//LK.gui.topRight.addChild(maxDepthLabel);
// Create 14 rows of 5 platforms each at game start
for (var row = 0; row < rowAmount; row++) {
/*
var leftBarrier = new SideBarrier();
@@ -652,10 +655,12 @@
platforms.forEach(function (platform) {
if (platform.update) {
platform.update();
}
- if (platform instanceof ScoreLabel) {
- platform.alpha--;
+ });
+ scoreLabels.forEach(function (scoreLabel) {
+ if (scoreLabel.update) {
+ scoreLabel.update();
}
});
} else {
if (LK.ticks % 120 == 0) {
@@ -721,31 +726,29 @@
game.addChild(t);
} else if (Math.random() < 0.1) {
var t = new PowerupMultiply();
t.x = platform.x;
- t.y = platform.y - t.height;
+ t.y = platform.y - t.height / 1.7;
platforms.push(t);
game.addChild(t);
} else if (Math.random() < 0.1) {
- if (maxDepth < 30) {
+ if (maxDepth < 50) {
var t = new PowerupFollow();
} else if (maxDepth < 100) {
if (Math.random() < 0.5) {
var t = new PowerupFollow();
} else {
var t = new PowerupBluebird();
}
- } else if (maxDepth < 200) {
+ } else {
var r = Math.random();
if (r < 0.33) {
var t = new PowerupFollow();
} else if (r < 0.66) {
var t = new PowerupBluebird();
} else {
var t = new PowerupGreenbird();
}
- } else {
- var t = new PowerupBluebird();
}
t.x = platform.x;
t.y = platform.y - t.height;
platforms.push(t);
A happy blue elephant.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
erase.
Make the bird sit inside a birdcage.
Three green arrows pointing down.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A sad little bluebird sitting down.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A happy little bluebird flying.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A happy little green bird flying.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lush jungle scenery with huge old trees covered in vines and overwrowth, blue sky and forested mountains in the background.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A dark wooden message board with vines and jungle moss growing on top.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A happy little blue elephant, looking scared, facing the viewer, legs flailing as it falls through the air.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A delicious peanut.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
delete