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 = 10000; tower1.y = 2732; var tower2 = game.addChild(new Tower()); tower2.x = 10600; tower2.y = 2732; var score = 0; var gameSpeed = 15; var isPressed = false; var touchX = 0; var touchY = 0; var isTouching = false; 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; // Move towers left for side-scrolling effect tower1.x -= gameSpeed; tower2.x -= gameSpeed; // Reset tower positions when they go off-screen if (tower1.x < -100) { tower1.x = 10000; } if (tower2.x < -100) { tower2.x = 10600; } checkCollisions(); // 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
@@ -64,27 +64,10 @@
/****
* Game Code
****/
-// Create a blue sky background
+// Create a simple blue background
game.setBackgroundColor(0x4169E1);
-// Add detailed cloud system for realistic sky
-var skyGradient = [];
-for (var i = 0; i < 5; i++) {
- var skyLayer = game.addChild(LK.getAsset('ground', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- skyLayer.x = 1024;
- skyLayer.y = i * 400;
- skyLayer.width = 2048;
- skyLayer.height = 450;
- // Create blue gradient layers
- var blueGradients = [0x4169E1, 0x5B7DE1, 0x6495ED, 0x87CEEB, 0xB0E0E6];
- skyLayer.tint = blueGradients[i];
- skyLayer.alpha = 0.2 + i * 0.15;
- skyGradient.push(skyLayer);
-}
// Add ground
var ground = game.addChild(LK.getAsset('ground', {
anchorX: 0.5,
anchorY: 1.0
@@ -97,65 +80,8 @@
anchorY: 0.5
}));
sun.x = 1800;
sun.y = 200;
-// Add detailed realistic clouds with multiple layers and varying properties
-var clouds = [];
-var cloudLayers = [{
- count: 12,
- minY: 80,
- maxY: 400,
- minScale: 0.3,
- maxScale: 0.9,
- minAlpha: 0.4,
- maxAlpha: 0.7,
- tintBase: 0xFFFFFF
-}, {
- count: 8,
- minY: 250,
- maxY: 600,
- minScale: 0.5,
- maxScale: 1.3,
- minAlpha: 0.5,
- maxAlpha: 0.8,
- tintBase: 0xF0F8FF
-}, {
- count: 6,
- minY: 400,
- maxY: 800,
- minScale: 0.8,
- maxScale: 1.8,
- minAlpha: 0.6,
- maxAlpha: 0.9,
- tintBase: 0xE6F3FF
-}];
-for (var layer = 0; layer < cloudLayers.length; layer++) {
- var cloudLayer = cloudLayers[layer];
- for (var i = 0; i < cloudLayer.count; i++) {
- var cloud = game.addChild(LK.getAsset('cloud', {
- anchorX: 0.5,
- anchorY: 0.5
- }));
- cloud.x = Math.random() * 3000 - 500; // Spread clouds beyond screen
- cloud.y = Math.random() * (cloudLayer.maxY - cloudLayer.minY) + cloudLayer.minY;
- // Vary cloud size and opacity for realistic depth
- var scale = Math.random() * (cloudLayer.maxScale - cloudLayer.minScale) + cloudLayer.minScale;
- cloud.scaleX = scale * (0.9 + Math.random() * 0.2);
- cloud.scaleY = scale * (0.7 + Math.random() * 0.4); // More varied flattening
- cloud.alpha = Math.random() * (cloudLayer.maxAlpha - cloudLayer.minAlpha) + cloudLayer.minAlpha;
- // Add detailed tint variations for realistic cloud colors
- var tintVariation = Math.random() * 0.15 - 0.075;
- var baseColor = cloudLayer.tintBase;
- var r = Math.min(255, Math.max(0, (baseColor >> 16 & 0xFF) + Math.floor(tintVariation * 40)));
- var g = Math.min(255, Math.max(0, (baseColor >> 8 & 0xFF) + Math.floor(tintVariation * 40)));
- var b = Math.min(255, Math.max(0, (baseColor & 0xFF) + Math.floor(tintVariation * 40)));
- cloud.tint = (r << 16) + (g << 8) + b;
- cloud.layer = layer;
- cloud.baseSpeed = (layer + 1) * 0.08; // More subtle speed differences
- cloud.floatOffset = Math.random() * Math.PI * 2; // Random float animation offset
- clouds.push(cloud);
- }
-}
var scoreTxt = new Text2('Score: 0', {
size: 60,
fill: 0x000000
});
@@ -316,44 +242,8 @@
airplane.lastX = airplane.x;
// Move towers left for side-scrolling effect
tower1.x -= gameSpeed;
tower2.x -= gameSpeed;
- // Move clouds with enhanced detailed parallax and floating effects
- for (var i = 0; i < clouds.length; i++) {
- var cloud = clouds[i];
- // Parallax movement based on layer depth
- var parallaxSpeed = gameSpeed * cloud.baseSpeed;
- cloud.x -= parallaxSpeed;
- // Enhanced floating motion with multiple sine waves for natural movement
- var floatY = Math.sin(LK.ticks * 0.015 + cloud.floatOffset) * 0.5;
- var floatY2 = Math.sin(LK.ticks * 0.008 + cloud.floatOffset * 1.3) * 0.3;
- cloud.y += floatY + floatY2;
- // Enhanced breathing effect with rotation for natural cloud movement
- var breathingScale = 1 + Math.sin(LK.ticks * 0.012 + i * 0.7) * 0.03;
- cloud.scaleX = cloud.scaleX * breathingScale;
- cloud.scaleY = cloud.scaleY * breathingScale;
- // Subtle rotation for natural cloud drift
- cloud.rotation += Math.sin(LK.ticks * 0.005 + i) * 0.002;
- // Enhanced alpha variation for realistic cloud density changes
- var alphaVariation = Math.sin(LK.ticks * 0.01 + i * 0.5) * 0.1;
- cloud.alpha = Math.max(0.2, Math.min(1.0, cloud.alpha + alphaVariation));
- // Reset cloud position when it goes off-screen
- if (cloud.x < -700) {
- cloud.x = 2800 + Math.random() * 500;
- // Randomly adjust cloud properties when it resets
- var cloudLayer = cloudLayers[cloud.layer];
- cloud.y = Math.random() * (cloudLayer.maxY - cloudLayer.minY) + cloudLayer.minY;
- cloud.alpha = Math.random() * (cloudLayer.maxAlpha - cloudLayer.minAlpha) + cloudLayer.minAlpha;
- // Enhanced tint variation with more realistic cloud colors
- var tintVariation = Math.random() * 0.15 - 0.075;
- var baseColor = cloudLayer.tintBase;
- var r = Math.min(255, Math.max(0, (baseColor >> 16 & 0xFF) + Math.floor(tintVariation * 40)));
- var g = Math.min(255, Math.max(0, (baseColor >> 8 & 0xFF) + Math.floor(tintVariation * 40)));
- var b = Math.min(255, Math.max(0, (baseColor & 0xFF) + Math.floor(tintVariation * 40)));
- cloud.tint = (r << 16) + (g << 8) + b;
- cloud.floatOffset = Math.random() * Math.PI * 2; // Reset float animation
- }
- }
// Reset tower positions when they go off-screen
if (tower1.x < -100) {
tower1.x = 10000;
}
@@ -383,14 +273,8 @@
// Reset joystick knob to center when not touching
joystickKnob.x = joystickCenter.x;
joystickKnob.y = joystickCenter.y;
}
- // Add subtle atmospheric movement to sky layers
- for (var i = 0; i < skyGradient.length; i++) {
- var layer = skyGradient[i];
- // Very subtle movement for atmosphere
- layer.alpha = 0.3 + i * 0.1 + Math.sin(LK.ticks * 0.005 + i) * 0.02;
- }
// Keep airplane centered horizontally at all times
airplane.x = 1024;
// Win condition
if (score >= 100) {
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