User prompt
Elements after left side screen despawn itself
User prompt
Add particle effect of fire in back of the bird
User prompt
Bg size = gameplay screen
User prompt
Link background with Bg assets
User prompt
Increase spawn rate of pipes
User prompt
Background colour black
Code edit (3 edits merged)
Please save this source code
User prompt
Increase speed
Code edit (1 edits merged)
Please save this source code
Initial prompt
Flappy bird
===================================================================
--- original.js
+++ change.js
@@ -146,16 +146,18 @@
for (var i = pipes.length - 1; i >= 0; i--) {
pipes[i].update();
if (pipes[i].intersects(bird)) {
LK.showGameOver();
- // Update fire particles
for (var k = game.children.length - 1; k >= 0; k--) {
if (game.children[k] instanceof FireParticle) {
game.children[k].update();
}
}
}
- ;
+ if (pipes[i].x < -pipes[i].width) {
+ pipes[i].destroy();
+ pipes.splice(i, 1);
+ }
}
for (var j = coins.length - 1; j >= 0; j--) {
coins[j].update();
if (coins[j].intersects(bird)) {
@@ -163,8 +165,12 @@
scoreTxt.setText(score);
coins[j].destroy();
coins.splice(j, 1);
}
+ if (coins[j].x < -coins[j].width) {
+ coins[j].destroy();
+ coins.splice(j, 1);
+ }
}
if (LK.ticks % 60 == 0) {
spawnPipe();
}
Spikes. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Gold coin write I on center of the coin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A 2d war symmetrical landscape low Polly. Single Game Texture. In-Game asset. 2d. Blank background. No shadows.
Fire partical trail. Single Game Texture. In-Game asset. 2d. Blank background. No shadows.