User prompt
encore plus vite
User prompt
une fois que la fée a passer une ligne de potion les potion doive tomber plus vite
User prompt
encore plus
User prompt
il faut que les potion bouge beaucoup plus !
User prompt
les potion doive bouger
User prompt
il faut qu'il y a plein de potion en même temp
User prompt
il dois y avoir de plus en plus de potion
User prompt
la fée dois être sur le curser
User prompt
la fée dois avoir trois vie si elle touche une potion elle perd un vie
Initial prompt
fairy
/**** * Classes ****/ // Fairy class var Fairy = Container.expand(function () { var self = Container.call(this); var fairyGraphics = self.createAsset('fairy', 'Fairy character', 0.5, 0.5); self.lives = 3; self.speed = 5; self.moveLeft = function () { self.x = Math.max(self.width / 2, self.x - self.speed); }; self.moveRight = function () { self.x = Math.min(2048 - self.width / 2, self.x + self.speed); }; self.moveUp = function () { self.y = Math.max(self.height / 2, self.y - self.speed); }; self.moveDown = function () { self.y = Math.min(2732 - self.height / 2, self.y + self.speed); }; }); // Potion class var Potion = Container.expand(function () { var self = Container.call(this); var potionGraphics = self.createAsset('potion', 'Witch potion', 0.5, 0.5); self.speed = 3; self.move = function () { self.y += self.speed; if (self.y > 2732 + self.height) { self.destroy(); } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 // Init game with black background }); /**** * Game Code ****/ // Initialize fairy var fairy = game.addChild(new Fairy()); fairy.x = 1024; // Center horizontally fairy.y = 2732 - 100; // Start near the bottom of the screen // Initialize potions array var potions = []; // Handle touch movement function handleTouchMove(obj) { var touchPos = obj.event.getLocalPosition(game); fairy.x = touchPos.x; fairy.y = touchPos.y; } // Add touch move listener to the game game.on('move', handleTouchMove); // Game tick event LK.on('tick', function () { // Move potions for (var i = potions.length - 1; i >= 0; i--) { potions[i].move(); if (fairy.intersects(potions[i])) { // Decrease fairy's lives when touching a potion and end game if lives are 0 fairy.lives--; LK.effects.flashObject(fairy, 0xff0000, 500); if (fairy.lives <= 0) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); return; } potions[i].destroy(); potions.splice(i, 1); } } // Spawn potions with increasing frequency var spawnRate = Math.max(30, 120 - Math.floor(LK.ticks / 1800)); // Decrease spawn interval every 30 seconds, minimum 0.5 seconds if (LK.ticks % spawnRate === 0) { for (var j = 0; j < 5; j++) { // Spawn 5 potions at once var potion = new Potion(); potion.x = Math.random() * (2048 - potion.width) + potion.width / 2; potion.y = -potion.height / 2; potions.push(potion); game.addChild(potion); } } });
===================================================================
--- original.js
+++ change.js
@@ -77,11 +77,14 @@
}
// Spawn potions with increasing frequency
var spawnRate = Math.max(30, 120 - Math.floor(LK.ticks / 1800)); // Decrease spawn interval every 30 seconds, minimum 0.5 seconds
if (LK.ticks % spawnRate === 0) {
- var potion = new Potion();
- potion.x = Math.random() * (2048 - potion.width) + potion.width / 2;
- potion.y = -potion.height / 2;
- potions.push(potion);
- game.addChild(potion);
+ for (var j = 0; j < 5; j++) {
+ // Spawn 5 potions at once
+ var potion = new Potion();
+ potion.x = Math.random() * (2048 - potion.width) + potion.width / 2;
+ potion.y = -potion.height / 2;
+ potions.push(potion);
+ game.addChild(potion);
+ }
}
});
\ No newline at end of file
nothing
fairy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
un monde féerique. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
enleve ça
le même coeur mais vide