Remix started
Copy Flap & Float
User prompt
change the score so that I get 30 points instead of 1.
User prompt
Change the scoring so that you subtract 3 point every time you click or tab.
User prompt
Show a small minus 3 next to the bird every time points are substracted
User prompt
change the background of the game to an cave
User prompt
Extend wall to go from top to buttom of the game
User prompt
Change the color of the score to orange
User prompt
Show an image in the background. I want to game to look like it is taking place in a cave
User prompt
Move the cave to the background
User prompt
Move the obstracle to the front
User prompt
Move the wall to the front
User prompt
move wall asset to sit in front of obstracle asset
User prompt
Change the color of the text in the beginning to the same as the score color
User prompt
Add a bonus to the screen randomly. When the player picks up the bonus it will give them 10 points
User prompt
make the back ground more interesting. Add 5 different sizes of rocks. They can't be interacted with.
User prompt
Add a bonus to the game. Everytime the player get its they will get 10 more points
User prompt
Move bonus to the foreground
User prompt
Add a small +30 everytime the bat the wall is hit.
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'fill')' in or related to this line: 'scoreAddition.children[0].style.fill = '#00ff00'; // Change the color to green' Line Number: 270
User prompt
a green number with a plus infront every time points are gained. Show it next to the bird.
User prompt
remove background
User prompt
change text color to a darker orange
===================================================================
--- original.js
+++ change.js
@@ -32,19 +32,8 @@
self.flip = function () {
self.scale.x *= -1;
};
});
-var Bonus = Container.expand(function () {
- var self = Container.call(this);
- var bonusGraphics = self.attachAsset('bonus', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.speed = 5;
- self._move_migrated = function (speed) {
- self.y += speed;
- };
-});
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleShadow = self.attachAsset('obstacleShadow', {
anchorX: 0.5,
@@ -114,9 +103,10 @@
tutorialTextWhite.y = -62;
LK.gui.bottom.addChild(tutorialTextWhite);
var tutorialText = new Text2('Tap to Flap\nHold to Float', {
size: 150,
- fill: '#FFA500',
+ fill: '#FF8C00',
+ // Change the color to a darker orange
font: 'Impact',
dropShadow: true,
dropShadowColor: '#222a9a',
dropShadowBlur: 5,
@@ -140,8 +130,14 @@
LK.showGameOver();
}
}
};
+var background = game.addChildAt(LK.getAsset('background', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2
+}), 0);
var scoreText = new Text2('0', {
size: 150,
fill: '#FFA500',
// Change the color to orange
@@ -171,11 +167,9 @@
var rightWall = game.addChild(new Wall());
rightWall.x = 2048;
rightWall.y = 2732 / 2; // Center the wall vertically
var leftObstacles = [],
- rightObstacles = [],
- bonuses = [];
-var bonusSpawnTime = Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness;
+ rightObstacles = [];
var obstacleSpawnRandomness = 120;
var obstacleSpawnRandomnessDecrease = 0.025 * (2 / 3);
var obstacleSpawnY = -500;
var leftObstacleSpawnTime = Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness;
@@ -223,15 +217,8 @@
newObstacle.y = -newObstacle.height;
rightObstacles.push(newObstacle);
rightObstacleSpawnTime += Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness;
}
- if (LK.ticks >= bonusSpawnTime) {
- var newBonus = game.addChildAt(new Bonus(), game.children.length);
- newBonus.x = Math.random() * 2048;
- newBonus.y = -newBonus.height;
- bonuses.push(newBonus);
- bonusSpawnTime += Math.floor(Math.random() * obstacleSpawnRandomness) + obstacleSpawnRandomness;
- }
if (bird.intersects(leftWall) && bird.xSpeed < 0 || bird.intersects(rightWall) && bird.xSpeed > 0) {
bird.xSpeed = -bird.xSpeed;
bird.flip();
game.score += 30;
@@ -253,23 +240,8 @@
}
}
game.checkObstacleCollision(leftObstacles);
game.checkObstacleCollision(rightObstacles);
- for (var i = bonuses.length - 1; i >= 0; i--) {
- bonuses[i]._move_migrated(game.obstacleSpeed);
- if (bonuses[i].y > 3232) {
- bonuses[i].destroy();
- bonuses.splice(i, 1);
- }
- if (bird.intersects(bonuses[i])) {
- game.score += 10;
- LK.setScore(game.score);
- scoreText.setText(game.score);
- scoreText2.setText(game.score);
- bonuses[i].destroy();
- bonuses.splice(i, 1);
- }
- }
if (bird.y < 0 || bird.y > 2732) {
LK.setScore(game.score);
LK.getSound('gameOverJingle').play();
LK.showGameOver();