User prompt
now the game resets only upon trying to shoot the 6th bubble. the reset should happen as soon as the 5th bubble has hit the edge of the screen
User prompt
if the player used all 5 lives and there's still skaters remaining on the screen, it's game over and we reset the game back to it's original state
User prompt
now let's add a lives system to the game. players only have 5 lives per level. when a bubble is shot, one live is deducted. thus players have 5 shots per level to clear the entire level of all the skaters. if they manage to destroy all the skaters using the 5 bubbles or less, they advance to the next level. upon advancement to the next level, all the lives are reset back to 5. so if the player had any remaining lives remaining, those are removed and 5 new ones are refilled
User prompt
now let's add levels to the game. level 1 starts with 5 skaters on the board. a new skater is added after each level, so level 2 has 6 skaters, level 3 has 7 skaters and so on. a level is considered complete if all the skaters in the current level have been destroyed
User prompt
change this to 0.1 if (self !== skaters[i] && self.intersects(skaters[i], 0.5)) {
User prompt
when skaters rotate, the rotation is too much, decrease the rotation angle
User prompt
change this to 0.5 if (self !== skaters[i] && self.intersects(skaters[i], 0.8)) {
User prompt
skaters now collide with each other, but it looks like the collision happens too soon, they dont even touch before colliding. make the hit box area smaller so they look like they actually touch
User prompt
Fix Bug: 'ReferenceError: skaters is not defined' in this line: 'for (var i = 0; i < skaters.length; i++) {' Line Number: 31
User prompt
Fix Bug: 'ReferenceError: skaters is not defined' in this line: 'for (var i = 0; i < skaters.length; i++) {' Line Number: 31
User prompt
Fix Bug: 'ReferenceError: skaters is not defined' in this line: 'for (var i = 0; i < skaters.length; i++) {' Line Number: 31
User prompt
make the skaters collide with each other
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'destroy')' in this line: 'skaters[s].destroy();' Line Number: 98
User prompt
skaters should also collide with each other
User prompt
skaters should also collide with each other
User prompt
Fix Bug: 'TypeError: this.checkCollisionsWithSkaters is not a function' in this line: 'this.checkCollisionsWithSkaters(skaters);' Line Number: 114
User prompt
Fix Bug: 'TypeError: this.checkCollisionsWithSkaters is not a function' in this line: 'this.checkCollisionsWithSkaters(skaters);' Line Number: 114
User prompt
Fix Bug: 'ReferenceError: skaters is not defined' in this line: 'self.checkCollisionsWithSkaters(skaters);' Line Number: 40
User prompt
Fix Bug: 'ReferenceError: skaters is not defined' in this line: 'self.checkCollisionsWithSkaters(skaters);' Line Number: 40
User prompt
skaters should also bounce off each other as they do from the edge of the screen
User prompt
when a skier is destroyed, 2 other are randomly generated on the screen
User prompt
when generating the skiers, they may get stuck inside the padding so they get stuck. ensure they get generated inside the screen area, inside the padding area
User prompt
when a bubble hits a skier, destroy the skier
User prompt
change the padding to 250 pixels
User prompt
make the padding 300 pixels
===================================================================
--- original.js
+++ change.js
@@ -64,14 +64,22 @@
});
var Game = Container.expand(function () {
LK.stage.on('down', function () {
if (self.lives > 0) {
- self.lives--;
var newBubble = self.addChild(new Bubble());
newBubble.rotation = shooter.rotation;
newBubble.x = shooter.x;
newBubble.y = shooter.y;
bubbles.push(newBubble);
+ self.lives--;
+ if (self.lives === 0) {
+ for (var i = 0; i < bubbles.length; i++) {
+ if (bubbles[i].x > 2048 || bubbles[i].x < 0 || bubbles[i].y > 2732 || bubbles[i].y < 0) {
+ isGameOver = true;
+ break;
+ }
+ }
+ }
} else if (skaters.length > 0) {
isGameOver = true;
}
});
floor of an ice skating ring. top-view. seen from above. Single Game Texture. In-Game asset. 2d. High contrast. No shadows. pixelated.8 bit. game background
snowboarder. top-view. gta 2. seen from above. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit
snowball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit
frosty pipe tube. top-view. seen from above. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8-bit
dusty snow puff. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit
green plus sign. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit
frost circle arena. seen from above. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit
angry penguin snowboarder wearing a red santa hat. top-view. gta 2. seen from above. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. pixelated. 8 bit