User prompt
Oyunda her meteor veya debrisleri lazer ile vurduğumuzda 100 puan versin. Score tabelası time tabelasının altında olsun
User prompt
Oyuna arka plan müziği eklemek istiyorum
User prompt
Oyunun adını PROJECT AEGIS olarak değiştirmek istiyorum. Menü ekranında PROJECT AEGIS yazsın. Menü ekranında Play tuşuna basınca oyun başlasın
User prompt
Oyuna menü ekranı koymak istiyorum
User prompt
The level names written above should not be 1-2-3-4-5. Instead of Level 1, write Easy, Level 2, Normal, Level 3, Hard, Level 4, Insane, and Level 5, Impossible.
User prompt
Her level geçişte oyuncunun attığı lazer atma yüzde 20 artsın
User prompt
Tüm debrisler laserle vurulmadan 2. Seviyeye geçmesin. Debrisler düşme hızı yüzde 15 azalsın
User prompt
Arkaplan assetini oluştur
User prompt
Büyük meteor eğer çarparak oyun bitiyorsa büyük bir patlama oluşsun. Eğer büyük meteordan kopan parçalar sebebiyle oyun bitiyorsa daha küçük bir patlama oluşsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Arka plan oluşturmak istiyorum
User prompt
Meteordan kopan parçalar ekranın yan tarafına gitmesin ve eğer oyuncuyu geçerse oyun bitsin
User prompt
İlk meteorun canını yüzde 200 arttır
User prompt
Meteordan kopan parçalar etrafa dağılarak aşağı düşsün
User prompt
Meteorun hızını zamanlayıcı sıfıra geldiğinde ekranın yarısını kaplayacak şekilde ayarla
User prompt
meteordan çıkan parçalar daha hızlı aşağı insin.
User prompt
ilk meteorun canı yüzde 30 daha fazla olsun level yükseldikçe can yüzde 10 artsın
User prompt
meteorun düşme hızı daha yavaş olsun. Meteordan parçalar meteor vurulmadıkça gelmesin
Code edit (1 edits merged)
Please save this source code
User prompt
Meteor Defense
Initial prompt
Uzaydan gelen bir meteoru durdurmaya çalıştığımız bir oyun olucak. Oyuncu alt kısımdan lazerle ateş edecek. Ekranın üst kısmından 30 saniyede ekranın üst yarısını kaplayacak hızda kocaman bir meteor gelicek. Oyuncumuz lazer ile meteoru sürekli vuruyor olucak. Lazer meteordan her 3 saniyede bir büyük parça kopartacak. Kopan parçalar aşağıya düşecek. Oyuncunun parçalardan kaçması gerekiyor. Oyuncu parçalara çarparsa oyun biter. 30. saniyede büyük meteor tamamen parçalanacak ve 1. bölüm bitecek. Oyun 5 bölüm olacak.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Cannon = Container.expand(function () { var self = Container.call(this); var cannonGraphics = self.attachAsset('cannon', { anchorX: 0.5, anchorY: 0.5 }); return self; }); var Debris = Container.expand(function () { var self = Container.call(this); var debrisGraphics = self.attachAsset('debris', { anchorX: 0.5, anchorY: 0.5 }); self.speed = Math.random() * 4 + 3; self.rotationSpeed = (Math.random() - 0.5) * 0.2; self.update = function () { self.y += self.speed; self.rotation += self.rotationSpeed; }; return self; }); var Laser = Container.expand(function () { var self = Container.call(this); var laserGraphics = self.attachAsset('laser', { anchorX: 0.5, anchorY: 1.0 }); self.speed = -12; self.update = function () { self.y += self.speed; }; return self; }); var Meteor = Container.expand(function () { var self = Container.call(this); var meteorGraphics = self.attachAsset('meteor', { anchorX: 0.5, anchorY: 0.5 }); self.health = 10; self.maxHealth = 10; self.speed = 0.5; self.lastHitTime = 0; self.update = function () { self.y += self.speed; }; self.takeDamage = function () { self.health--; self.lastHitTime = LK.ticks; LK.effects.flashObject(self, 0xff0000, 200); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000022 }); /**** * Game Code ****/ // Game state variables var currentLevel = 1; var totalLevels = 5; var gameState = 'playing'; // 'playing', 'levelComplete', 'gameComplete' // Game objects var cannon = null; var currentMeteor = null; var lasers = []; var debrisList = []; // Timing variables var levelStartTime = 0; var levelDuration = 30 * 60; // 30 seconds at 60 FPS var lastDebrisSpawnTime = 0; var debrisSpawnInterval = 3 * 60; // 3 seconds at 60 FPS // UI elements var levelText = new Text2('Level 1', { size: 80, fill: 0xFFFFFF }); levelText.anchor.set(0.5, 0); LK.gui.top.addChild(levelText); levelText.y = 100; var healthText = new Text2('Meteor Health: 10', { size: 60, fill: 0xFF6666 }); healthText.anchor.set(0, 0); LK.gui.topRight.addChild(healthText); healthText.x = -400; healthText.y = 100; var timeText = new Text2('Time: 30', { size: 60, fill: 0x66FF66 }); timeText.anchor.set(1, 0); LK.gui.topRight.addChild(timeText); timeText.x = -50; timeText.y = 180; // Initialize cannon cannon = game.addChild(new Cannon()); cannon.x = 2048 / 2; cannon.y = 2732 - 100; function startLevel(level) { // Clear existing objects for (var i = lasers.length - 1; i >= 0; i--) { lasers[i].destroy(); lasers.splice(i, 1); } for (var j = debrisList.length - 1; j >= 0; j--) { debrisList[j].destroy(); debrisList.splice(j, 1); } if (currentMeteor) { currentMeteor.destroy(); } // Create new meteor for this level currentMeteor = game.addChild(new Meteor()); currentMeteor.x = Math.random() * (2048 - 300) + 150; currentMeteor.y = 200; // Scale meteor health and size based on level var levelMultiplier = 1 + (level - 1) * 0.5; // First meteor has 30% more health, then +10% per level var baseHealth = 10 * 1.3; // 30% more health for first meteor var healthMultiplier = 1 + (level - 1) * 0.1; // 10% increase per level currentMeteor.health = Math.floor(baseHealth * healthMultiplier); currentMeteor.maxHealth = currentMeteor.health; currentMeteor.scaleX = levelMultiplier; currentMeteor.scaleY = levelMultiplier; currentMeteor.speed = 0.5 + (level - 1) * 0.2; // Reset timing levelStartTime = LK.ticks; lastDebrisSpawnTime = LK.ticks; // Update UI levelText.setText('Level ' + level); healthText.setText('Meteor Health: ' + currentMeteor.health); gameState = 'playing'; } function createDebris() { if (!currentMeteor) return; var debris = game.addChild(new Debris()); debris.x = currentMeteor.x + (Math.random() - 0.5) * 200; debris.y = currentMeteor.y + 50; debrisList.push(debris); LK.getSound('debris_spawn').play(); } function fireLaser() { var laser = game.addChild(new Laser()); laser.x = cannon.x; laser.y = cannon.y - 40; lasers.push(laser); LK.getSound('laser_shoot').play(); } // Input handling var isFiring = false; var fireTimer = 0; var fireRate = 10; // Fire every 10 ticks (6 times per second) game.down = function (x, y, obj) { isFiring = true; fireTimer = 0; }; game.up = function (x, y, obj) { isFiring = false; }; game.move = function (x, y, obj) { cannon.x = x; // Keep cannon within screen bounds if (cannon.x < 60) cannon.x = 60; if (cannon.x > 2048 - 60) cannon.x = 2048 - 60; }; // Start first level startLevel(1); game.update = function () { if (gameState !== 'playing') return; // Handle continuous firing if (isFiring) { fireTimer++; if (fireTimer >= fireRate) { fireLaser(); fireTimer = 0; } } // Update time display var timeRemaining = Math.max(0, Math.ceil((levelDuration - (LK.ticks - levelStartTime)) / 60)); timeText.setText('Time: ' + timeRemaining); // Check for level timeout if (LK.ticks - levelStartTime >= levelDuration) { // Time's up - game over LK.showGameOver(); return; } // Debris spawning is now handled when meteor is hit // Update and check lasers for (var i = lasers.length - 1; i >= 0; i--) { var laser = lasers[i]; // Remove lasers that go off screen if (laser.y < -50) { laser.destroy(); lasers.splice(i, 1); continue; } // Check laser-meteor collision if (currentMeteor && laser.intersects(currentMeteor)) { currentMeteor.takeDamage(); healthText.setText('Meteor Health: ' + currentMeteor.health); laser.destroy(); lasers.splice(i, 1); LK.getSound('meteor_hit').play(); // Spawn debris when meteor is hit createDebris(); // Check if meteor is destroyed if (currentMeteor.health <= 0) { currentMeteor.destroy(); currentMeteor = null; // Level complete currentLevel++; if (currentLevel > totalLevels) { // Game complete LK.showYouWin(); } else { // Start next level after brief delay LK.setTimeout(function () { startLevel(currentLevel); }, 1000); } } continue; } } // Update and check debris for (var j = debrisList.length - 1; j >= 0; j--) { var debris = debrisList[j]; // Remove debris that go off screen if (debris.y > 2732 + 50) { debris.destroy(); debrisList.splice(j, 1); continue; } // Check debris-cannon collision if (debris.intersects(cannon)) { // Game over LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); return; } // Check debris-laser collision for (var k = lasers.length - 1; k >= 0; k--) { var laser = lasers[k]; if (debris.intersects(laser)) { // Destroy both debris and laser debris.destroy(); debrisList.splice(j, 1); laser.destroy(); lasers.splice(k, 1); break; } } } };
===================================================================
--- original.js
+++ change.js
@@ -131,9 +131,12 @@
currentMeteor.x = Math.random() * (2048 - 300) + 150;
currentMeteor.y = 200;
// Scale meteor health and size based on level
var levelMultiplier = 1 + (level - 1) * 0.5;
- currentMeteor.health = Math.floor(10 * levelMultiplier);
+ // First meteor has 30% more health, then +10% per level
+ var baseHealth = 10 * 1.3; // 30% more health for first meteor
+ var healthMultiplier = 1 + (level - 1) * 0.1; // 10% increase per level
+ currentMeteor.health = Math.floor(baseHealth * healthMultiplier);
currentMeteor.maxHealth = currentMeteor.health;
currentMeteor.scaleX = levelMultiplier;
currentMeteor.scaleY = levelMultiplier;
currentMeteor.speed = 0.5 + (level - 1) * 0.2;
moon like meteor. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Küçük meteor parçası . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
2D top-down view sci-fi laser turret, mounted on a rotating base, glowing energy cell, detailed mechanical parts, metallic finish, compact and powerful look, pixel art or vector style, no background. In-Game asset. 2d. High contrast. No shadows