User prompt
oyun başlar başlamaz kule olmasın
User prompt
şuanlinin de yarısı olsun
User prompt
kuleler arası mesafe şuankinin yarısı kadar olsun ,
User prompt
kuleler arası mesafe daha fazla olsun şuankinden 100 kat daha fazla
User prompt
kuleler olsun ama çok abartı sayıda olmasın
User prompt
bi 1000 kat daha uzak olsun ve havada bulutlar olsun
User prompt
daha da uzak olsun çook uzak
User prompt
1 tane kule olsun ve başlangıçtan 10000 pixel uazaklıkta olsun
User prompt
kuleleri yaklaştır
User prompt
az önceki gibi yap kuleleri
User prompt
kuleler bu kadar iç içe olmasın
User prompt
arka plan mavi olsun sadece
User prompt
arka planı mavi yap ve bulut detayı koy ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bulutlu bir gökyüzü yap ama gerçekçi olsun hafif renk geçişleri fln
User prompt
bak uçak kuleye temas etmeden patlıyor tam temas ederken hatta uçak kanatlarının önene kadar kuleye girince uçagın olduğu yerde patlama olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
patlama kulenin üstünde olsun daha büyük olsun uçak kuleye uçağın burnu deyince patlasın ve uçak yukarı aşağı hareket ederken burnu ve arkası sabit kalsın yani burnu aşağı yukarı arkası aşağı yukarı gitmesin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Patlama efekti de bomba tarzı olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Kuleye çarpınca yanalım ve patlama efekti ile game over olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Kulelere temas etmeden oyun bitmesin bi de temas edince bir patlama efekti olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Uçak yukarı aşağı hareket ederken sadece joystick ile olsun joystick ileri geri hareket ettirmesin
User prompt
Joystick aşağı inince uçak yukarı çıksın ve yukarı çıkarken uçağın burnu yukarı kalksın arkası aşağı insin aynı şekilde joystick yukari çıkınca uçak aşağı insin ve burnu aşağı insin arkası yukarı çıksın bide joystick hareketi suanki kadar çok hızlı olmasın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Hareket ettirmeyi uçağın üstünden yapmayalım joystick olsun brawl starsdaki gibi
User prompt
Uçak daha da yukarı çıkabilmesi gerek
User prompt
Yukarı çıkma bu kadar az olmamalı limit en üste kadar çıkmalı
User prompt
Joystick olmadı
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Airplane = Container.expand(function () { var self = Container.call(this); var airplaneGraphics = self.attachAsset('airplane', { anchorX: 0.5, anchorY: 0.5 }); self.velocityY = 0; self.gravity = 0.5; self.jumpPower = -35; self.speed = 4; self.lastY = 0; self.lastIntersecting1 = false; self.lastIntersecting2 = false; self.jump = function () { if (!isPressed) { self.velocityY = self.jumpPower; LK.getSound('engine').play(); } isPressed = true; }; self.update = function () { self.lastY = self.y; // Apply gravity only when not continuously pressed if (!isPressed) { self.velocityY += self.gravity; } else { // Fly straight when continuously pressed self.velocityY = 0; } self.y += self.velocityY; // Keep airplane level at all times airplaneGraphics.rotation = 0; // Keep airplane within bounds - only lower bound if (self.y > 2600) { self.y = 2600; self.velocityY = 0; } }; return self; }); var Tower = Container.expand(function () { var self = Container.call(this); var towerGraphics = self.attachAsset('tower', { anchorX: 0.5, anchorY: 1.0 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ // Create a simple blue background game.setBackgroundColor(0x4169E1); // Add ground var ground = game.addChild(LK.getAsset('ground', { anchorX: 0.5, anchorY: 1.0 })); ground.x = 1024; ground.y = 2732; // Add sun var sun = game.addChild(LK.getAsset('sun', { anchorX: 0.5, anchorY: 0.5 })); sun.x = 1800; sun.y = 200; var scoreTxt = new Text2('Score: 0', { size: 60, fill: 0x000000 }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var airplane = game.addChild(new Airplane()); airplane.x = 200; airplane.y = 1366; var tower1 = game.addChild(new Tower()); tower1.x = -1000; // Start towers off-screen tower1.y = 2732; var tower2 = game.addChild(new Tower()); tower2.x = -1000; // Start towers off-screen tower2.y = 2732; var score = 0; var gameSpeed = 15; var isPressed = false; var touchX = 0; var touchY = 0; var isTouching = false; var clouds = []; // Create clouds in the sky for (var i = 0; i < 4; i++) { var cloud = game.addChild(LK.getAsset('cloud', { anchorX: 0.5, anchorY: 0.5 })); cloud.x = Math.random() * 3000 + 500; cloud.y = Math.random() * 800 + 200; cloud.alpha = 0.7; cloud.speed = Math.random() * 2 + 1; clouds.push(cloud); } var joystickCenter = { x: 300, y: 2400 }; // Add joystick visual elements var joystickBase = game.addChild(LK.getAsset('joystick_base', { anchorX: 0.5, anchorY: 0.5 })); joystickBase.x = joystickCenter.x; joystickBase.y = joystickCenter.y; joystickBase.alpha = 0.6; var joystickKnob = game.addChild(LK.getAsset('joystick_knob', { anchorX: 0.5, anchorY: 0.5 })); joystickKnob.x = joystickCenter.x; joystickKnob.y = joystickCenter.y; joystickKnob.alpha = 0.8; function updateScore() { scoreTxt.setText('Score: ' + score); } function checkCollisions() { // More precise collision detection - check if airplane nose penetrates tower // Calculate airplane nose position (front edge) var airplaneNoseX = airplane.x + 200; // Airplane nose is about 200px from center var airplaneLeftWing = airplane.x - 200; // Left wing edge var airplaneRightWing = airplane.x + 200; // Right wing edge var airplaneTop = airplane.y - 125; // Top of airplane var airplaneBottom = airplane.y + 125; // Bottom of airplane // Check tower1 collision - more precise detection var tower1Left = tower1.x - 50; // Tower width consideration var tower1Right = tower1.x + 50; var tower1Top = tower1.y - 1500; // Tower height var tower1Bottom = tower1.y; var currentIntersecting1 = airplaneNoseX >= tower1Left && airplaneLeftWing <= tower1Right && airplaneBottom >= tower1Top && airplaneTop <= tower1Bottom; // Check tower2 collision - more precise detection var tower2Left = tower2.x - 50; // Tower width consideration var tower2Right = tower2.x + 50; var tower2Top = tower2.y - 1500; // Tower height var tower2Bottom = tower2.y; var currentIntersecting2 = airplaneNoseX >= tower2Left && airplaneLeftWing <= tower2Right && airplaneBottom >= tower2Top && airplaneTop <= tower2Bottom; if (!airplane.lastIntersecting1 && currentIntersecting1 || !airplane.lastIntersecting2 && currentIntersecting2) { // Just hit a tower - create bomb explosion effect LK.getSound('crash').play(); // Flash the airplane red for explosion effect LK.effects.flashObject(airplane, 0xff0000, 500); // Create multiple explosion circles for bomb effect at airplane position var explosionCircles = []; for (var i = 0; i < 12; i++) { var circle = game.addChild(LK.getAsset('explosion_circle', { anchorX: 0.5, anchorY: 0.5 })); circle.x = airplane.x + (Math.random() - 0.5) * 300; circle.y = airplane.y + (Math.random() - 0.5) * 300; circle.alpha = 0.8; circle.tint = i % 2 === 0 ? 0xff4500 : 0xffa500; // Alternate between orange and yellow explosionCircles.push(circle); // Animate each circle expanding and fading tween(circle, { scaleX: 8 + Math.random() * 4, scaleY: 8 + Math.random() * 4, alpha: 0 }, { duration: 400 + Math.random() * 200, easing: tween.easeOut, onFinish: function onFinish() { circle.destroy(); } }); } // Screen shake effect using tween tween(game, { x: 10 }, { duration: 50, onFinish: function onFinish() { tween(game, { x: -10 }, { duration: 50, onFinish: function onFinish() { tween(game, { x: 5 }, { duration: 50, onFinish: function onFinish() { tween(game, { x: 0 }, { duration: 50, onFinish: function onFinish() { // Show game over after explosion effects complete LK.showGameOver(); } }); } }); } }); } }); } airplane.lastIntersecting1 = currentIntersecting1; airplane.lastIntersecting2 = currentIntersecting2; // Check if airplane passed towers for scoring if (airplane.lastX < tower1.x && airplane.x >= tower1.x) { score += 10; updateScore(); } if (airplane.lastX < tower2.x && airplane.x >= tower2.x) { score += 10; updateScore(); } } game.down = function (x, y, obj) { // Only respond to touches in the joystick area var distanceFromJoystick = Math.sqrt((x - joystickCenter.x) * (x - joystickCenter.x) + (y - joystickCenter.y) * (y - joystickCenter.y)); if (distanceFromJoystick <= 150) { touchX = x; touchY = y; isTouching = true; airplane.jump(); } }; game.move = function (x, y, obj) { if (isTouching) { touchX = x; touchY = y; } }; game.up = function (x, y, obj) { isPressed = false; isTouching = false; }; game.update = function () { airplane.lastX = airplane.x; // Initialize towers after some delay (when airplane moves forward) if (LK.ticks > 180) { // 3 seconds delay (60 FPS * 3) if (tower1.x < 0) { tower1.x = 2200; } if (tower2.x < 0) { tower2.x = 25600; // 25x farther spacing between towers } } // Move towers left for side-scrolling effect if (tower1.x > 0) { tower1.x -= gameSpeed; } if (tower2.x > 0) { tower2.x -= gameSpeed; } // Reset tower positions when they go off-screen if (tower1.x < -100) { tower1.x = 25600; // 25x farther spacing } if (tower2.x < -100) { tower2.x = 51200; // Maintain 25x farther spacing } checkCollisions(); // Move clouds slowly across the sky for (var i = 0; i < clouds.length; i++) { clouds[i].x -= clouds[i].speed; // Reset cloud position when it goes off-screen if (clouds[i].x < -200) { clouds[i].x = 2300; clouds[i].y = Math.random() * 800 + 200; } } // Joystick control - move airplane vertically only if (isTouching) { var deltaY = touchY - joystickCenter.y; // Limit joystick knob movement vertically only var maxRange = 100; if (deltaY > maxRange) { deltaY = maxRange; } else if (deltaY < -maxRange) { deltaY = -maxRange; } // Update joystick knob position - vertical movement only joystickKnob.x = joystickCenter.x; joystickKnob.y = joystickCenter.y + deltaY; // Move airplane vertically based on joystick input var moveScale = 4; var targetY = 1366 - deltaY * moveScale; // Inverted Y-axis // Keep airplane within screen bounds vertically airplane.y = Math.max(-500, Math.min(2632, targetY)); } else { // Reset joystick knob to center when not touching joystickKnob.x = joystickCenter.x; joystickKnob.y = joystickCenter.y; } // Keep airplane centered horizontally at all times airplane.x = 1024; // Win condition if (score >= 100) { LK.showYouWin(); } };
===================================================================
--- original.js
+++ change.js
@@ -90,12 +90,12 @@
var airplane = game.addChild(new Airplane());
airplane.x = 200;
airplane.y = 1366;
var tower1 = game.addChild(new Tower());
-tower1.x = 2200;
+tower1.x = -1000; // Start towers off-screen
tower1.y = 2732;
var tower2 = game.addChild(new Tower());
-tower2.x = 25600; // 25x farther spacing between towers (half of previous)
+tower2.x = -1000; // Start towers off-screen
tower2.y = 2732;
var score = 0;
var gameSpeed = 15;
var isPressed = false;
@@ -252,11 +252,25 @@
isTouching = false;
};
game.update = function () {
airplane.lastX = airplane.x;
+ // Initialize towers after some delay (when airplane moves forward)
+ if (LK.ticks > 180) {
+ // 3 seconds delay (60 FPS * 3)
+ if (tower1.x < 0) {
+ tower1.x = 2200;
+ }
+ if (tower2.x < 0) {
+ tower2.x = 25600; // 25x farther spacing between towers
+ }
+ }
// Move towers left for side-scrolling effect
- tower1.x -= gameSpeed;
- tower2.x -= gameSpeed;
+ if (tower1.x > 0) {
+ tower1.x -= gameSpeed;
+ }
+ if (tower2.x > 0) {
+ tower2.x -= gameSpeed;
+ }
// Reset tower positions when they go off-screen
if (tower1.x < -100) {
tower1.x = 25600; // 25x farther spacing
}
Plane. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
İkiz kule . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
yuvarlak ve gerçekçi güneş
gerçekçi patlama biraz ateş biraz duman. In-Game asset. 2d. High contrast. No shadows
bulut. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat