User prompt
Que el maximo de cajas sea de 2
User prompt
Que el maximo de cajas acumuladas sea de 3
User prompt
Que el efecto de la caja de acumule , y triplique la cantidad de balas disparadas ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Reduce la vida de los enemigos dorados a solo 2 disparos
User prompt
Al obtener la caja las balas disparadas ahora serán 3 estilo escopeta ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Cambia el tiempo de recarga a 2
User prompt
Al eliminadar al enemigo dorado este dejara una caja , y si el jugador le dispara a la caja las balas se duplicarán ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Agrega un nuevo enemigo de color dorado que aparezca cada 10 segundos ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Si el jugador toca en un momento incorrecto, perderá una bala y agrega un efecto de fallo
User prompt
Ahora agrega un sistema de balas , y un contador grande en la parte inferior izquierda, que sean 10 balas, y al acabarlas esperar 3 segundos para que recargue ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Que los enemigos se dirijan al jugador ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Que los enemigos vengan de arriba
User prompt
Aa la barra de acierto más grande
User prompt
As la barra de cronometro un poco más grande
User prompt
As la barra de acierto un poco más grande
User prompt
Sincroniza los bpm con los de la música
User prompt
Cambia el metrónomo a 75 bpm
User prompt
Sincroniza el metrónomo a 100 bpm ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Baja al jugador un poco
User prompt
Cambia la velocidad de la bala x10
User prompt
Cambia el estilo de apuntado, que allá una mira o puntero que el jugador use para disparar dónde toque
Code edit (1 edits merged)
Please save this source code
User prompt
Rhythm Shooter
Initial prompt
Crea un juego rítmico con disparos, dónde allá que seguir el ritmo para poder disparar
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Bullet = Container.expand(function () { var self = Container.call(this); var bulletGraphics = self.attachAsset('bullet', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 80; self.direction = { x: 0, y: 0 }; self.update = function () { self.x += self.direction.x * self.speed; self.y += self.direction.y * self.speed; }; return self; }); var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 2; self.health = 1; self.direction = { x: 0, y: 0 }; self.update = function () { self.x += self.direction.x * self.speed; self.y += self.direction.y * self.speed; }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.canShoot = false; return self; }); var RhythmIndicator = Container.expand(function () { var self = Container.call(this); var rhythmBar = self.attachAsset('rhythmBar', { anchorX: 0.5, anchorY: 0.5 }); var perfectZone = self.attachAsset('perfectZone', { anchorX: 0.5, anchorY: 0.5 }); perfectZone.alpha = 0.7; var indicator = self.attachAsset('rhythmIndicator', { anchorX: 0.5, anchorY: 0.5 }); indicator.x = -200; self.beatDuration = 1000; self.startTime = 0; self.update = function () { var elapsed = LK.ticks * (1000 / 60) - self.startTime; var progress = elapsed % self.beatDuration / self.beatDuration; indicator.x = -200 + progress * 400; var perfectZoneStart = 180; var perfectZoneEnd = 220; var indicatorPos = 200 + indicator.x; if (indicatorPos >= perfectZoneStart && indicatorPos <= perfectZoneEnd) { player.canShoot = true; perfectZone.tint = 0x27AE60; } else { player.canShoot = false; perfectZone.tint = 0xE67E22; } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1A1A2E }); /**** * Game Code ****/ var player = game.addChild(new Player()); player.x = 1024; player.y = 2000; var rhythmIndicator = game.addChild(new RhythmIndicator()); rhythmIndicator.x = 1024; rhythmIndicator.y = 200; rhythmIndicator.startTime = LK.ticks * (1000 / 60); var enemies = []; var bullets = []; var spawnTimer = 0; var gameSpeed = 1; var scoreTxt = new Text2('Score: 0', { size: 60, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var rhythmTxt = new Text2('Hit the beat!', { size: 40, fill: 0x27AE60 }); rhythmTxt.anchor.set(0.5, 0); rhythmTxt.y = 80; LK.gui.top.addChild(rhythmTxt); function spawnEnemy() { var enemy = new Enemy(); var side = Math.floor(Math.random() * 4); switch (side) { case 0: // Top enemy.x = Math.random() * 2048; enemy.y = -50; enemy.direction.x = (player.x - enemy.x) / 100; enemy.direction.y = 1; break; case 1: // Right enemy.x = 2098; enemy.y = Math.random() * 2732; enemy.direction.x = -1; enemy.direction.y = (player.y - enemy.y) / 100; break; case 2: // Bottom enemy.x = Math.random() * 2048; enemy.y = 2782; enemy.direction.x = (player.x - enemy.x) / 100; enemy.direction.y = -1; break; case 3: // Left enemy.x = -50; enemy.y = Math.random() * 2732; enemy.direction.x = 1; enemy.direction.y = (player.y - enemy.y) / 100; break; } var length = Math.sqrt(enemy.direction.x * enemy.direction.x + enemy.direction.y * enemy.direction.y); enemy.direction.x /= length; enemy.direction.y /= length; enemies.push(enemy); game.addChild(enemy); } function shootBullet(targetX, targetY) { if (!player.canShoot) { rhythmTxt.setText('Wrong timing!'); rhythmTxt.tint = 0xE74C3C; return; } rhythmTxt.setText('Perfect!'); rhythmTxt.tint = 0x27AE60; var bullet = new Bullet(); bullet.x = player.x; bullet.y = player.y; var dx = targetX - bullet.x; var dy = targetY - bullet.y; var length = Math.sqrt(dx * dx + dy * dy); bullet.direction.x = dx / length; bullet.direction.y = dy / length; bullets.push(bullet); game.addChild(bullet); LK.getSound('shoot').play(); } game.down = function (x, y, obj) { shootBullet(x, y); }; game.update = function () { spawnTimer++; if (spawnTimer >= 120 / gameSpeed) { spawnEnemy(); spawnTimer = 0; } // Update bullets for (var i = bullets.length - 1; i >= 0; i--) { var bullet = bullets[i]; if (bullet.x < -50 || bullet.x > 2098 || bullet.y < -50 || bullet.y > 2782) { bullet.destroy(); bullets.splice(i, 1); continue; } // Check bullet-enemy collisions for (var j = enemies.length - 1; j >= 0; j--) { var enemy = enemies[j]; if (bullet.intersects(enemy)) { LK.setScore(LK.getScore() + 10); scoreTxt.setText('Score: ' + LK.getScore()); LK.getSound('hit').play(); LK.effects.flashObject(enemy, 0xFFFFFF, 200); bullet.destroy(); bullets.splice(i, 1); enemy.destroy(); enemies.splice(j, 1); break; } } } // Update enemies for (var k = enemies.length - 1; k >= 0; k--) { var enemy = enemies[k]; if (enemy.intersects(player)) { LK.effects.flashScreen(0xFF0000, 1000); LK.showGameOver(); return; } if (enemy.x < -100 || enemy.x > 2148 || enemy.y < -100 || enemy.y > 2832) { enemy.destroy(); enemies.splice(k, 1); } } // Increase difficulty over time if (LK.getScore() > 0 && LK.getScore() % 100 === 0 && LK.ticks % 60 === 0) { gameSpeed += 0.1; rhythmIndicator.beatDuration = Math.max(600, rhythmIndicator.beatDuration - 50); } }; LK.playMusic('bgmusic');
===================================================================
--- original.js
+++ change.js
@@ -11,9 +11,9 @@
var bulletGraphics = self.attachAsset('bullet', {
anchorX: 0.5,
anchorY: 0.5
});
- self.speed = 8;
+ self.speed = 80;
self.direction = {
x: 0,
y: 0
};
@@ -22,17 +22,8 @@
self.y += self.direction.y * self.speed;
};
return self;
});
-var Crosshair = Container.expand(function () {
- var self = Container.call(this);
- var crosshairGraphics = self.attachAsset('crosshair', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- crosshairGraphics.alpha = 0.7;
- return self;
-});
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.attachAsset('enemy', {
anchorX: 0.5,
@@ -107,11 +98,8 @@
****/
var player = game.addChild(new Player());
player.x = 1024;
player.y = 2000;
-var crosshair = game.addChild(new Crosshair());
-crosshair.x = 1024;
-crosshair.y = 1366;
var rhythmIndicator = game.addChild(new RhythmIndicator());
rhythmIndicator.x = 1024;
rhythmIndicator.y = 200;
rhythmIndicator.startTime = LK.ticks * (1000 / 60);
@@ -190,14 +178,10 @@
bullets.push(bullet);
game.addChild(bullet);
LK.getSound('shoot').play();
}
-game.move = function (x, y, obj) {
- crosshair.x = x;
- crosshair.y = y;
-};
game.down = function (x, y, obj) {
- shootBullet(crosshair.x, crosshair.y);
+ shootBullet(x, y);
};
game.update = function () {
spawnTimer++;
if (spawnTimer >= 120 / gameSpeed) {
Modern App Store icon, high definition, square with rounded corners, for a game titled "Rhythm Shooter" and with the description "Time your shots to the beat! A rhythm-based shooter where you can only fire when hitting the perfect musical timing.". No text on icon!
Zombie desde arriba estilo rpg, pixelart. In-Game asset. 2d. High contrast. No shadows
Zombie de oro , pixelart
Cámbialo a color neon blanco retro
Borra todo lo del sentro y crea un marco multicolor retro
Caja de munición de colores retro pixelart. In-Game asset. 2d. High contrast. No shadows
Vuelvelo neon brillante por bordes
Agrégale una bata negra y un bastón, pixelart
Agrega un círculo en el medio estilo retro con un arma, pixelart
Cambiarles los colores a azul y rojo escuro , pixelart
Una barra neon de forma cuadrada. In-Game asset. 2d. High contrast. No shadows