User prompt
Add a background
User prompt
Every document you get make a 1/10 change to spawn a 500 x 500 size drone to kill the player
User prompt
Make 1 out of every 10 drones 200x200 size and able to kill the ai
User prompt
Every drone the ai eat spawn 2 more
User prompt
After you get 10 documents make 200x200 drone spawn the drones x2 and let the player eat\delete 100x100 drones
User prompt
Kill squares are not spawning fix it
User prompt
After you get ten documents start spawning kill squares
User prompt
Make all kill squares and drones spawn at the top and sides
User prompt
Only start spawning enemies and kill squares one second after the start
User prompt
Make it so the kill squares spawn at least 100 pixels above you on spawn
User prompt
Make the closest that they can spawn at the start 50 pixels away
User prompt
Make the closest any thing can spawn from you at the start 10 pixels away
User prompt
Make the kill squares move on the side at the same speed as drones
User prompt
Add random 100x200 and 200x100 squares that kill you
User prompt
At the start spawn 10 documents
User prompt
Make it so every five documents you eat five more spawn randomly
Initial prompt
Ai feed and grow
===================================================================
--- original.js
+++ change.js
@@ -63,8 +63,25 @@
self.speed *= -1; // Reverse direction when hitting screen edges
}
};
});
+// LargeDrone class representing larger enemies
+var LargeDrone = Container.expand(function () {
+ var self = Container.call(this);
+ var largeDroneGraphics = self.attachAsset('drone', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ width: 200,
+ height: 200
+ });
+ self.speed = 2;
+ self.update = function () {
+ self.y += self.speed;
+ if (self.y > 2732) {
+ self.y = -self.height;
+ }
+ };
+});
/****
* Initialize Game
****/
@@ -140,10 +157,24 @@
documents.push(newDocument);
game.addChild(newDocument);
}
}
- // Start spawning killer squares after collecting ten documents
+ // Start spawning larger drones and killer squares after collecting ten documents
if (documents.length <= 0) {
+ for (var m = 0; m < 5; m++) {
+ var largeDrone = new LargeDrone();
+ if (Math.random() > 0.5) {
+ // Spawn at the top
+ largeDrone.x = Math.random() * 2048;
+ largeDrone.y = -largeDrone.height;
+ } else {
+ // Spawn at the sides
+ largeDrone.x = Math.random() > 0.5 ? -largeDrone.width : 2048 + largeDrone.width;
+ largeDrone.y = Math.random() * 2732;
+ }
+ drones.push(largeDrone);
+ game.addChild(largeDrone);
+ }
for (var j = 0; j < 5; j++) {
var killerSquare = new KillerSquare();
if (Math.random() > 0.5) {
// Spawn at the top
@@ -162,11 +193,17 @@
}
// Check for collisions between AI and drones
for (var j = drones.length - 1; j >= 0; j--) {
if (ai.intersects(drones[j])) {
- // Handle collision with drone (e.g., game over)
- LK.effects.flashScreen(0xff0000, 1000);
- LK.showGameOver();
+ if (drones[j].width === 100 && drones[j].height === 100) {
+ // AI can eat/delete 100x100 drones
+ drones[j].destroy();
+ drones.splice(j, 1);
+ } else {
+ // Handle collision with larger drone (e.g., game over)
+ LK.effects.flashScreen(0xff0000, 1000);
+ LK.showGameOver();
+ }
}
}
// Check for collisions between AI and killer squares
for (var l = killerSquares.length - 1; l >= 0; l--) {
A yellow folder document. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A evil cartoon drone. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A fun loving hungry cartoon drone with a giant mouth. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cartoon flying police car. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A top down view of a city. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.