User prompt
yrti isnot jumping
User prompt
in winter season bird will become yeti and walk on ground and jump for 15 sec ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
reduce monster jump to 5
User prompt
winter season backround snow fall and mount everest ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
in point 25 it will be winter season
User prompt
reduce monster jump
User prompt
all poles will connect and increase gap
User prompt
arrange poles systematically
User prompt
in night time bird become monster who can fly and dodge poles for 10 sec ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
dodge only poles
User prompt
nigh time will increase movement speed
User prompt
not working
User prompt
righ click have dodge button tp above the pole cooldown 7 second ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
10 change it into five
User prompt
increas gaps between poles
User prompt
add seasons in points 10 it will night
User prompt
add wings to bird ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
in a way only 1 line has 1 pole
User prompt
poll will be not in air
User prompt
make game easier
User prompt
increase the bird size
User prompt
gap between poles will be larger
User prompt
has animation on wings ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bird will move onlu forward not rotate
User prompt
make game easy
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Bird = Container.expand(function () {
var self = Container.call(this);
var birdGraphics = self.attachAsset('bird', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocity = 0;
self.gravity = 0.3;
self.flapPower = -18;
self.rotation = 0;
self.isMonster = false;
self.monsterEndTime = 0;
self.isYeti = false;
self.yetiEndTime = 0;
self.isOnGround = false;
self.walkSpeed = 3;
// Transform into monster
self.transformToMonster = function () {
if (!self.isMonster) {
self.isMonster = true;
self.monsterEndTime = LK.ticks + 600; // 10 seconds at 60fps
// Remove current bird graphics
self.removeChild(birdGraphics);
// Add monster graphics
self.monsterGraphics = self.attachAsset('monster', {
anchorX: 0.5,
anchorY: 0.5
});
// Enhanced abilities
self.flapPower = -5; // Reduced jump power
self.gravity = 0.1; // Less gravity
// Visual effect
tween(self.monsterGraphics, {
scaleX: 1.3,
scaleY: 1.3
}, {
duration: 500,
easing: tween.elasticOut
});
}
};
// Transform into yeti for winter season
self.transformToYeti = function () {
if (!self.isYeti) {
self.isYeti = true;
self.yetiEndTime = LK.ticks + 900; // 15 seconds at 60fps
// Remove current graphics
if (self.isMonster && self.monsterGraphics) {
self.removeChild(self.monsterGraphics);
} else {
self.removeChild(birdGraphics);
}
// Add yeti graphics
self.yetiGraphics = self.attachAsset('yeti', {
anchorX: 0.5,
anchorY: 0.5
});
// Set yeti on ground
self.y = 2732 - 150;
self.isOnGround = true;
self.velocity = 0;
// Yeti abilities
self.flapPower = -5; // Small jump
self.gravity = 0.8; // Higher gravity to stay grounded
// Visual effect
tween(self.yetiGraphics, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 500,
easing: tween.elasticOut
});
}
};
// Transform back to normal bird
self.transformToNormal = function () {
if (self.isMonster) {
self.isMonster = false;
// Remove monster graphics
if (self.monsterGraphics) {
self.removeChild(self.monsterGraphics);
}
}
if (self.isYeti) {
self.isYeti = false;
self.isOnGround = false;
// Remove yeti graphics
if (self.yetiGraphics) {
self.removeChild(self.yetiGraphics);
}
}
// Add back bird graphics
birdGraphics = self.attachAsset('bird', {
anchorX: 0.5,
anchorY: 0.5
});
// Reset normal abilities
self.flapPower = -18;
self.gravity = 0.3;
// Restart wing animation
self.startWingAnimation();
};
// Start continuous wing flapping animation
self.startWingAnimation = function () {
// Create a continuous flapping animation by scaling the bird
function flapUp() {
tween(birdGraphics, {
scaleY: 1.2
}, {
duration: 150,
easing: tween.easeOut,
onFinish: flapDown
});
}
function flapDown() {
tween(birdGraphics, {
scaleY: 0.8
}, {
duration: 150,
easing: tween.easeOut,
onFinish: flapUp
});
}
// Start the animation cycle
flapUp();
};
// Start wing animation immediately
self.startWingAnimation();
self.flap = function () {
self.velocity = self.flapPower;
LK.getSound('flap').play();
};
self.update = function () {
// Check if monster time is up
if (self.isMonster && LK.ticks >= self.monsterEndTime) {
self.transformToNormal();
}
// Check if yeti time is up
if (self.isYeti && LK.ticks >= self.yetiEndTime) {
self.transformToNormal();
}
// Yeti walking behavior
if (self.isYeti && self.isOnGround) {
// Walk left and right on ground
self.x += Math.sin(LK.ticks * 0.05) * self.walkSpeed;
// Keep within screen bounds
if (self.x < 100) self.x = 100;
if (self.x > 1948) self.x = 1948;
}
// Apply physics based on current form
if (!self.isYeti || !self.isOnGround) {
self.velocity += self.gravity;
self.y += self.velocity;
}
// Handle collisions based on current form
if (!self.isMonster && !self.isYeti) {
// Normal bird - dies on collision
if (self.y > 2732 - 150) {
self.y = 2732 - 150;
gameOver = true;
}
// Check ceiling collision
if (self.y < 50) {
self.y = 50;
gameOver = true;
}
} else if (self.isMonster && !self.isYeti) {
// Monster just bounces off boundaries
if (self.y > 2732 - 150) {
self.y = 2732 - 150;
self.velocity = -Math.abs(self.velocity);
}
if (self.y < 50) {
self.y = 50;
self.velocity = Math.abs(self.velocity);
}
} else if (self.isYeti) {
// Yeti stays on ground but can jump
if (self.y > 2732 - 150) {
self.y = 2732 - 150;
if (self.velocity > 0) {
// Only reset velocity if falling down
self.velocity = 0;
}
self.isOnGround = true;
}
if (self.y < 50) {
self.y = 50;
self.velocity = Math.abs(self.velocity);
}
}
};
return self;
});
var Pipe = Container.expand(function () {
var self = Container.call(this);
self.gapSize = 1200; // Increased gap size for easier navigation
self.speed = -2;
self.scored = false;
// Create top pipe
self.topPipe = self.attachAsset('pipe', {
anchorX: 0.5,
anchorY: 1
});
// Create bottom pipe
self.bottomPipe = self.attachAsset('pipe', {
anchorX: 0.5,
anchorY: 0
});
self.setGapPosition = function (gapY) {
self.topPipe.y = gapY - self.gapSize / 2;
self.bottomPipe.y = gapY + self.gapSize / 2;
};
self.update = function () {
self.x += self.speed;
// Check if bird passed through pipe
if (!self.scored && self.x < bird.x) {
self.scored = true;
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore());
LK.getSound('score').play();
}
};
return self;
});
var SnowParticle = Container.expand(function () {
var self = Container.call(this);
var snowGraphics = self.attachAsset('wing', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.3,
scaleY: 0.3,
tint: 0xFFFFFF
});
self.speed = Math.random() * 2 + 1;
self.drift = Math.random() * 0.5 - 0.25;
self.update = function () {
self.y += self.speed;
self.x += self.drift;
if (self.y > 2732) {
self.y = -50;
self.x = Math.random() * 2048;
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
var bird;
var pipes = [];
var ground;
var scoreTxt;
var gameOver = false;
var gameStarted = false;
var pipeSpawnTimer = 0;
var pipeSpawnInterval = 240; // frames between pipe spawns - increased gap
var hasTransformedToMonster = false;
var mountainBackground;
var snowParticles = [];
var isWinterActive = false;
// Create ground
ground = game.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 1,
x: 0,
y: 2732
}));
// Create bird
bird = game.addChild(new Bird());
bird.x = 300;
bird.y = 2732 / 2;
// Create score text
scoreTxt = new Text2('0', {
size: 80,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
scoreTxt.y = 100;
// Create instruction text
var instructionTxt = new Text2('TAP TO START', {
size: 60,
fill: 0xFFFFFF
});
instructionTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(instructionTxt);
var pipePatternIndex = 0;
var pipePositions = [800, 1000, 1200, 1400, 1600, 1800, 1600, 1400, 1200, 1000]; // Connected systematic pattern
function spawnPipe() {
var pipe = new Pipe();
pipe.x = 2048 + 60;
// Use systematic pattern with smooth transitions
var gapY = pipePositions[pipePatternIndex % pipePositions.length];
pipePatternIndex++;
pipe.setGapPosition(gapY);
pipes.push(pipe);
game.addChild(pipe);
}
function checkCollisions() {
// Monster and yeti are invincible and can fly through pipes
if (bird.isMonster || bird.isYeti) {
return;
}
for (var i = 0; i < pipes.length; i++) {
var pipe = pipes[i];
// Check collision with top pipe
if (bird.intersects(pipe.topPipe)) {
gameOver = true;
LK.getSound('hit').play();
return;
}
// Check collision with bottom pipe
if (bird.intersects(pipe.bottomPipe)) {
gameOver = true;
LK.getSound('hit').play();
return;
}
}
}
function checkSeasonChange() {
// Winter season at 25 points
if (LK.getScore() >= 25) {
game.setBackgroundColor(0xF0F8FF); // Winter white/light blue
// Add Mount Everest background once
if (!isWinterActive) {
isWinterActive = true;
// Transform bird to yeti for winter
bird.transformToYeti();
// Add mountain background
mountainBackground = game.addChild(LK.getAsset('mountain', {
anchorX: 0.5,
anchorY: 1,
x: 1024,
y: 2732 - 100
}));
// Send mountain to back
game.setChildIndex(mountainBackground, 0);
// Create snow particles
for (var i = 0; i < 50; i++) {
var snow = new SnowParticle();
snow.x = Math.random() * 2048;
snow.y = Math.random() * 2732;
snowParticles.push(snow);
game.addChild(snow);
}
}
} else if (LK.getScore() >= 5) {
// Change to night theme when score reaches 5
game.setBackgroundColor(0x1a1a2e); // Dark night blue
// Transform bird to monster once when reaching night time
if (!hasTransformedToMonster) {
hasTransformedToMonster = true;
bird.transformToMonster();
}
} else {
game.setBackgroundColor(0x87CEEB); // Day sky blue
}
}
function cleanupPipes() {
for (var i = pipes.length - 1; i >= 0; i--) {
var pipe = pipes[i];
if (pipe.x < -100) {
pipe.destroy();
pipes.splice(i, 1);
}
}
}
game.down = function (x, y, obj) {
if (gameOver) {
return;
}
if (!gameStarted) {
gameStarted = true;
instructionTxt.visible = false;
}
bird.flap();
};
game.update = function () {
if (gameOver) {
LK.showGameOver();
return;
}
if (!gameStarted) {
return;
}
// Update bird
// Spawn pipes
pipeSpawnTimer++;
if (pipeSpawnTimer >= pipeSpawnInterval) {
spawnPipe();
pipeSpawnTimer = 0;
}
// Check collisions
checkCollisions();
// Check for season changes
checkSeasonChange();
// Cleanup off-screen pipes
cleanupPipes();
// Update snow particles if winter is active
if (isWinterActive) {
for (var i = 0; i < snowParticles.length; i++) {
snowParticles[i].update();
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -185,9 +185,12 @@
} else if (self.isYeti) {
// Yeti stays on ground but can jump
if (self.y > 2732 - 150) {
self.y = 2732 - 150;
- self.velocity = 0;
+ if (self.velocity > 0) {
+ // Only reset velocity if falling down
+ self.velocity = 0;
+ }
self.isOnGround = true;
}
if (self.y < 50) {
self.y = 50;
single pole flappy bird. In-Game asset. 2d. High contrast. No shadows
ground have mincraft ground trxture. In-Game asset. 2d. High contrast. No shadows
long dragon. In-Game asset. 2d. High contrast. No shadows
yeti cartoon image. In-Game asset. 2d. High contrast. No shadows
speed dragon. In-Game asset. 2d. High contrast. No shadows
mount everest. In-Game asset. 2d. High contrast. No shadows
crown. In-Game asset. 2d. High contrast. No shadows
replay button. In-Game asset. 2d. High contrast. No shadows