User prompt
didnt work. Just make the wave skiper skip 3 waves
User prompt
do it
User prompt
Pick a card screen doesnt appear when I use the secret wave skipper can you help?
User prompt
change our secret wave skip button to skip 5 wave so ı can test the pick screen
User prompt
New mechanic! After every 5 wave 3 diffrent cards will apear at player screen and game will stop. Cards will have powers such as: Bouncy: Your bullets bounce to a diffrent zombie after use ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make the tough zombia appear only after 10. wave not 5
User prompt
Make it die with 2 bullet not 3
User prompt
Second zombie type! tough zombie: Has %5 change to replace a normal zombie ,it wont appear first 5 wave. And after that every wave its change of replace a zombie will increase by %1 until %90. make a assent for it
User prompt
Remove the red effect on the fast zombie
User prompt
Zombies number going up so fast and being kinda same after some round fix it
User prompt
Make fast zombies only come after the 5 wave
User prompt
Make a new asset for fast zombies AND they are not fast pls fix it
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'tint')' in or related to this line: 'graphics.tint = 0xff6666; // Light red tint' Line Number: 86
User prompt
LETS ADD ZOMBİE VARATİONS! First: Fast zombie has a %10 change of replace a normal zombie. the change will increasce %1 every wave but never will be more then %80. Fast zombie is just a faster zombie
User prompt
Lets instead of making zombies faster, make them come more at once when waves go more
User prompt
Make it skip 10 wave
User prompt
Bana normal oyuncuların bulamiyacağın ama benim yerini bildiğim bir wave atlama yöntemi lazım
User prompt
Add a background and music
User prompt
make bloods disappear time 10 to 5
User prompt
Make the blood spread all over the floor when they die ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make zombies explode and spead blood when died. After 10 second blood will start slowly disappearing ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
make zombies look at me
User prompt
remove them fully from game
User prompt
make the cooldown longer and bullets faster
User prompt
add a cooldown to bullet shoot speed
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var BloodSplat = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('blood', { anchorX: 0.5, anchorY: 0.5 }); self.lifetime = 600; // 10 seconds at 60fps self.fadeStartTime = 0; self.isFading = false; self.update = function () { self.lifetime--; // Start fading after 10 seconds if (self.lifetime <= 0 && !self.isFading) { self.isFading = true; tween(graphics, { alpha: 0 }, { duration: 3000, onFinish: function onFinish() { self.destroy(); } }); } }; return self; }); var Bullet = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('bullet', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 20; self.dx = 0; self.dy = 0; self.active = true; self.update = function () { if (!self.active) return; self.x += self.dx; self.y += self.dy; if (self.x < -50 || self.x > 2098 || self.y < -50 || self.y > 2782) { self.active = false; } }; self.setDirection = function (targetX, targetY) { var dx = targetX - self.x; var dy = targetY - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { self.dx = dx / distance * self.speed; self.dy = dy / distance * self.speed; // Rotate bullet to face direction of travel graphics.rotation = Math.atan2(dy, dx) + Math.PI / 2; } }; return self; }); var Monster = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('monster', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 2; self.health = 1; self.damage = 10; self.active = true; self.lastPlayerDistance = 0; self.update = function () { if (!self.active) return; var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; // Rotate monster to face the player graphics.rotation = Math.atan2(dy, dx) + Math.PI / 2; } var currentDistance = distance; if (self.lastPlayerDistance > 50 && currentDistance <= 50) { player.takeDamage(self.damage); self.active = false; } self.lastPlayerDistance = currentDistance; }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.active = false; // Create blood explosion for (var i = 0; i < 8; i++) { var bloodSplat = new BloodSplat(); bloodSplat.x = self.x + (Math.random() - 0.5) * 100; bloodSplat.y = self.y + (Math.random() - 0.5) * 100; bloodSplat.graphics = bloodSplat.children[0]; var scale = 0.5 + Math.random() * 1.5; bloodSplat.graphics.scaleX = scale; bloodSplat.graphics.scaleY = scale; bloodSplats.push(bloodSplat); game.addChild(bloodSplat); } LK.setScore(LK.getScore() + 10); LK.getSound('hit').play(); return true; } return false; }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.health = 100; self.maxHealth = 100; self.fireRate = 8; self.fireTimer = 0; self.update = function () { if (self.fireTimer > 0) { self.fireTimer--; } }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.health = 0; LK.showGameOver(); } LK.effects.flashObject(self, 0xff0000, 300); }; self.canFire = function () { return self.fireTimer <= 0; }; self.fire = function () { if (self.canFire()) { self.fireTimer = self.fireRate; return true; } return false; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2c3e50 }); /**** * Game Code ****/ var player = null; var bullets = []; var monsters = []; var bloodSplats = []; var waveNumber = 1; var monstersInWave = 5; var monstersSpawned = 0; var monstersKilled = 0; var spawnTimer = 0; var waveDelay = 180; var bulletCooldown = 0; var scoreText = new Text2('Score: 0', { size: 60, fill: 0xFFFFFF }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); var healthText = new Text2('Health: 100', { size: 50, fill: 0xFF4444 }); healthText.anchor.set(0, 0); healthText.x = 120; healthText.y = 20; LK.gui.topLeft.addChild(healthText); var waveText = new Text2('Wave: 1', { size: 50, fill: 0x4A90E2 }); waveText.anchor.set(1, 0); LK.gui.topRight.addChild(waveText); player = game.addChild(new Player()); player.x = 1024; player.y = 1366; function spawnMonster() { if (monstersSpawned >= monstersInWave) return; var monster = new Monster(); var side = Math.floor(Math.random() * 4); switch (side) { case 0: // Top monster.x = Math.random() * 2048; monster.y = -30; break; case 1: // Right monster.x = 2078; monster.y = Math.random() * 2732; break; case 2: // Bottom monster.x = Math.random() * 2048; monster.y = 2762; break; case 3: // Left monster.x = -30; monster.y = Math.random() * 2732; break; } monster.speed = 1.5 + waveNumber * 0.3; monsters.push(monster); game.addChild(monster); monstersSpawned++; } function cleanupBullets() { for (var i = bullets.length - 1; i >= 0; i--) { var bullet = bullets[i]; if (!bullet.active) { bullet.destroy(); bullets.splice(i, 1); } } } function cleanupMonsters() { for (var i = monsters.length - 1; i >= 0; i--) { var monster = monsters[i]; if (!monster.active) { monster.destroy(); monsters.splice(i, 1); monstersKilled++; } } } function cleanupBloodSplats() { for (var i = bloodSplats.length - 1; i >= 0; i--) { var bloodSplat = bloodSplats[i]; if (!bloodSplat.parent) { bloodSplats.splice(i, 1); } } } function checkBulletCollisions() { for (var i = 0; i < bullets.length; i++) { var bullet = bullets[i]; if (!bullet.active) continue; for (var j = 0; j < monsters.length; j++) { var monster = monsters[j]; if (!monster.active) continue; if (bullet.intersects(monster)) { bullet.active = false; monster.takeDamage(1); break; } } } } function nextWave() { waveNumber++; monstersInWave = 5 + waveNumber * 2; monstersSpawned = 0; monstersKilled = 0; spawnTimer = 0; waveDelay = 180; waveText.setText('Wave: ' + waveNumber); } game.down = function (x, y, obj) { if (bulletCooldown <= 0 && player.fire()) { var bullet = new Bullet(); bullet.x = player.x; bullet.y = player.y; bullet.setDirection(x, y); bullets.push(bullet); game.addChild(bullet); LK.getSound('shoot').play(); bulletCooldown = 30; } }; game.update = function () { if (bulletCooldown > 0) { bulletCooldown--; } if (waveDelay > 0) { waveDelay--; return; } spawnTimer++; if (spawnTimer >= 60 && monstersSpawned < monstersInWave) { spawnMonster(); spawnTimer = 0; } checkBulletCollisions(); cleanupBullets(); cleanupMonsters(); cleanupBloodSplats(); if (monstersKilled >= monstersInWave && monsters.length === 0) { nextWave(); } scoreText.setText('Score: ' + LK.getScore()); healthText.setText('Health: ' + player.health); };
===================================================================
--- original.js
+++ change.js
@@ -5,8 +5,34 @@
/****
* Classes
****/
+var BloodSplat = Container.expand(function () {
+ var self = Container.call(this);
+ var graphics = self.attachAsset('blood', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.lifetime = 600; // 10 seconds at 60fps
+ self.fadeStartTime = 0;
+ self.isFading = false;
+ self.update = function () {
+ self.lifetime--;
+ // Start fading after 10 seconds
+ if (self.lifetime <= 0 && !self.isFading) {
+ self.isFading = true;
+ tween(graphics, {
+ alpha: 0
+ }, {
+ duration: 3000,
+ onFinish: function onFinish() {
+ self.destroy();
+ }
+ });
+ }
+ };
+ return self;
+});
var Bullet = Container.expand(function () {
var self = Container.call(this);
var graphics = self.attachAsset('bullet', {
anchorX: 0.5,
@@ -69,8 +95,20 @@
self.takeDamage = function (damage) {
self.health -= damage;
if (self.health <= 0) {
self.active = false;
+ // Create blood explosion
+ for (var i = 0; i < 8; i++) {
+ var bloodSplat = new BloodSplat();
+ bloodSplat.x = self.x + (Math.random() - 0.5) * 100;
+ bloodSplat.y = self.y + (Math.random() - 0.5) * 100;
+ bloodSplat.graphics = bloodSplat.children[0];
+ var scale = 0.5 + Math.random() * 1.5;
+ bloodSplat.graphics.scaleX = scale;
+ bloodSplat.graphics.scaleY = scale;
+ bloodSplats.push(bloodSplat);
+ game.addChild(bloodSplat);
+ }
LK.setScore(LK.getScore() + 10);
LK.getSound('hit').play();
return true;
}
@@ -126,8 +164,9 @@
****/
var player = null;
var bullets = [];
var monsters = [];
+var bloodSplats = [];
var waveNumber = 1;
var monstersInWave = 5;
var monstersSpawned = 0;
var monstersKilled = 0;
@@ -206,8 +245,16 @@
monstersKilled++;
}
}
}
+function cleanupBloodSplats() {
+ for (var i = bloodSplats.length - 1; i >= 0; i--) {
+ var bloodSplat = bloodSplats[i];
+ if (!bloodSplat.parent) {
+ bloodSplats.splice(i, 1);
+ }
+ }
+}
function checkBulletCollisions() {
for (var i = 0; i < bullets.length; i++) {
var bullet = bullets[i];
if (!bullet.active) continue;
@@ -258,8 +305,9 @@
}
checkBulletCollisions();
cleanupBullets();
cleanupMonsters();
+ cleanupBloodSplats();
if (monstersKilled >= monstersInWave && monsters.length === 0) {
nextWave();
}
scoreText.setText('Score: ' + LK.getScore());
Bullet. In-Game asset. 2d. High contrast. No shadows
A extremly basic zombie look from top. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A round drop of blood. In-Game asset. 2d. High contrast. No shadows
Make it simple no blood or object
Make its skin blue and make it smile
A happier version of this zombie but its will be purple
Make it green
small rock. In-Game asset. 2d. High contrast. No shadows
Yellow version of it
make it white
Explosion!. In-Game asset. 2d. High contrast. No shadows
Lightning. In-Game asset. 2d. High contrast. No shadows
Make it rainbow and extremly happy
A cowboy hat from top. In-Game asset. 2d. High contrast. No shadows
Hake his skin red and add horns
A card. In-Game asset. 2d. High contrast. No shadows