User prompt
arka plan rengini açık kahverengi yap
User prompt
arkaplan rengini eflatun yap
User prompt
arkaplan rengini siyah yap
User prompt
arkaplan rengini beyaz yap
User prompt
eski haline geri getir
User prompt
kuş ekrandan tamamen çıkmadan öldürme, kuşun uzunluklarına göre yeniden tasarla
User prompt
üst ve alt için çok az daha tolerans sağla
User prompt
ekranın en altına yada en üsttüne çıkarsa kuş yine ölür yani ekrandan çıkarsa tamamen öldür
Code edit (2 edits merged)
Please save this source code
User prompt
hala iki puan sorunu var
Code edit (2 edits merged)
Please save this source code
User prompt
Değişmedi yine 2 puan veriyor kodu iyice incele ayrıca hala ilk engeli puansız geçiyor, kendini düzelt
User prompt
her geçişte 2 puan veriyor 1 puan versin ve oyun sonunda ekrana yazdırsın aynı zamanda ilk engelden geçtikten sonra puan vermiyor onu da düzelt
User prompt
Engellerden her geçtiğimizde bir skor kazanalım, öldükten sonra skoru göster
Code edit (2 edits merged)
Please save this source code
User prompt
çok daha kısa olsun engeller arası mesefa
Code edit (1 edits merged)
Please save this source code
User prompt
engeller arası mesafe kısalmıyor, kısalsın
User prompt
engeller arası mesafe kısalsın
User prompt
ekrana bastığımda kuş şimdikinden daha fazla yükselsin
/**** * Classes ****/ //<Write imports for supported plugins here> // Bird class representing the player-controlled bird var Bird = Container.expand(function () { var self = Container.call(this); var birdGraphics = self.attachAsset('bird', { anchorX: 0.5, anchorY: 0.5 }); self.velocityY = 0; self.gravity = 0.3; self.lift = -15; self.update = function () { self.velocityY += self.gravity; self.y += self.velocityY; if (self.y < 0) { self.y = 0; self.velocityY = 0; } else if (self.y > 2732) { self.y = 2732; self.velocityY = 0; } }; self.flap = function () { self.velocityY = self.lift; }; }); // Obstacle class representing the obstacles var Obstacle = Container.expand(function () { var self = Container.call(this); var obstacleGraphics = self.attachAsset('obstacle', { anchorX: 0.5, anchorY: 0.5 }); self.speed = -5; self.update = function () { self.x += self.speed; // Remove obstacle if it goes off-screen if (self.x < -100) { self.destroy(); } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xD2B48C // Light brown background }); /**** * Game Code ****/ //<Assets used in the game will automatically appear here> var bird = game.addChild(new Bird()); bird.x = 2048 / 2; bird.y = 2732 / 2; var obstacles = []; var obstacleInterval = 100; // Interval for obstacle generation var ticks = 0; game.down = function (x, y, obj) { bird.flap(); LK.getSound('Tik').play(); }; var score = 0; var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); LK.gui.top.addChild(scoreTxt); game.update = function () { bird.update(); // Generate obstacles at intervals if (ticks % obstacleInterval === 0) { var gap = -1200; // Gap between top and bottom obstacles var topObstacleHeight = Math.random() * (2732 - gap); var bottomObstacleHeight = 2732 - topObstacleHeight - gap; var topObstacle = new Obstacle(); topObstacle.x = 2048; topObstacle.y = 0; // Connect the top obstacle to the top of the screen topObstacle.height = topObstacleHeight; // Set the height of the top obstacle obstacles.push(topObstacle); game.addChild(topObstacle); var bottomObstacle = new Obstacle(); bottomObstacle.x = 2048; bottomObstacle.y = 2732; // Connect the bottom obstacle to the bottom of the screen bottomObstacle.height = bottomObstacleHeight; // Set the height of the bottom obstacle obstacles.push(bottomObstacle); game.addChild(bottomObstacle); } // Update obstacles and check for collisions for (var i = obstacles.length - 1; i >= 0; i--) { var obstacle = obstacles[i]; obstacle.update(); if (bird.intersects(obstacle) || bird.y <= 0 || bird.y >= 2732) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(score); return; } if (obstacle.x < bird.x && !obstacle.passed && obstacle.y == 0) { obstacle.passed = true; score += 1; scoreTxt.setText(score.toString()); } if (obstacle.x < -100) { obstacles.splice(i, 1); } } ticks++; };
===================================================================
--- original.js
+++ change.js
@@ -47,9 +47,9 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x800080 // Purple background
+ backgroundColor: 0xD2B48C // Light brown background
});
/****
* Game Code