User prompt
Create boxes at half the probability as are created now
User prompt
Lanterns (bubbles) should be spawned at a 10% from the bottom of the screen
User prompt
Box1 is causing many issues - it's rendering some times loooots of harpoons. That can't never happen, if a box1 gets active destroy the harpoons created by the currently active box1
User prompt
Boxes that destroy bubbles will prevent those bubbles from creating boxes
User prompt
Mark harpoons generated with boxes - those harpoons will never create boxes by triggering a bubble.
User prompt
Make sure that the popped ballons with the boxes power (the bomb - destruction, the multi harpoon, etc) - they don't produce any box. Boxes can only be produced if I manually pop the balloons with my harpoon.
User prompt
There is an issue: the effects of the boxes seem accumulative? Every time I pick a box it has the effect of the previous boxes otr something like that? Please fix it: one box one effect.
User prompt
When the player collisions / intersects any of the reward boxes (box, box1, box2, box3) they should be picked up and applied.
User prompt
Make the harpoon has less speed. Don't change antyhing else.
Code edit (4 edits merged)
Please save this source code
User prompt
Make the harpoon have a bigger vertical reach
Code edit (3 edits merged)
Please save this source code
User prompt
The death effect, now tints to red. Please make it so that it tints sequentially using rainbow colors
Code edit (1 edits merged)
Please save this source code
User prompt
When the player ends, be creative and create something during 2-3 seconds to let knwo the playe rhas died. And then the game over, as usual.
Code edit (1 edits merged)
Please save this source code
User prompt
The bubbles / lamps don't get destroyed by colliding with the player.
User prompt
Make the harpoon and trail go much quicker up ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please don't hurt / harm / remove life from the player with collisions between bubbles and the player. Remove that. The player only looses life when the lamps go out of the screen from the top of the screen.
User prompt
Ok. Now the lanterns can NOT really harm / hit the player. Instead, they will hit the player if they have not been destroyed when they go out of the screen from the top
User prompt
My bubbles - they go from top to bottom, as they fall. But they are really lanterns, so they should fly from the bottom to the top, the other way around. PLease make the fix
Code edit (1 edits merged)
Please save this source code
Initial prompt
Lantern Splash
/**** * Classes ****/ // Class for Enemies var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732 + enemyGraphics.height) { self.destroy(); } }; }); //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Class for the Hero character var Hero = Container.expand(function () { var self = Container.call(this); var heroGraphics = self.attachAsset('hero', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 10; self.update = function () { // Update logic for hero }; self.shoot = function () { var bullet = new HeroBullet(); bullet.x = self.x; bullet.y = self.y - heroGraphics.height / 2; game.addChild(bullet); heroBullets.push(bullet); }; }); // Class for Hero's bullets var HeroBullet = Container.expand(function () { var self = Container.call(this); var bulletGraphics = self.attachAsset('heroBullet', { anchorX: 0.5, anchorY: 0.5 }); self.speed = -15; self.update = function () { self.y += self.speed; if (self.y < -bulletGraphics.height) { self.destroy(); } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize variables var hero; var heroBullets = []; var enemies = []; var score = 0; // Create hero and add to game hero = new Hero(); hero.x = 2048 / 2; hero.y = 2732 - 150; game.addChild(hero); // Function to spawn enemies function spawnEnemy() { var enemy = new Enemy(); enemy.x = Math.random() * 2048; enemy.y = -50; game.addChild(enemy); enemies.push(enemy); } // Handle game updates game.update = function () { // Update hero bullets for (var i = heroBullets.length - 1; i >= 0; i--) { heroBullets[i].update(); if (heroBullets[i].y < -50) { heroBullets[i].destroy(); heroBullets.splice(i, 1); } } // Update enemies for (var j = enemies.length - 1; j >= 0; j--) { enemies[j].update(); if (enemies[j].y > 2732 + 50) { enemies[j].destroy(); enemies.splice(j, 1); } } // Check for collisions between hero bullets and enemies for (var k = heroBullets.length - 1; k >= 0; k--) { for (var l = enemies.length - 1; l >= 0; l--) { if (heroBullets[k].intersects(enemies[l])) { heroBullets[k].destroy(); enemies[l].destroy(); heroBullets.splice(k, 1); enemies.splice(l, 1); score += 10; break; } } } }; // Set interval to spawn enemies LK.setInterval(spawnEnemy, 2000); // Handle touch events for shooting game.down = function (x, y, obj) { hero.shoot(); };
/****
* Classes
****/
// Class for Enemies
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.attachAsset('enemy', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
self.y += self.speed;
if (self.y > 2732 + enemyGraphics.height) {
self.destroy();
}
};
});
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Class for the Hero character
var Hero = Container.expand(function () {
var self = Container.call(this);
var heroGraphics = self.attachAsset('hero', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 10;
self.update = function () {
// Update logic for hero
};
self.shoot = function () {
var bullet = new HeroBullet();
bullet.x = self.x;
bullet.y = self.y - heroGraphics.height / 2;
game.addChild(bullet);
heroBullets.push(bullet);
};
});
// Class for Hero's bullets
var HeroBullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.attachAsset('heroBullet', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = -15;
self.update = function () {
self.y += self.speed;
if (self.y < -bulletGraphics.height) {
self.destroy();
}
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
// Initialize variables
var hero;
var heroBullets = [];
var enemies = [];
var score = 0;
// Create hero and add to game
hero = new Hero();
hero.x = 2048 / 2;
hero.y = 2732 - 150;
game.addChild(hero);
// Function to spawn enemies
function spawnEnemy() {
var enemy = new Enemy();
enemy.x = Math.random() * 2048;
enemy.y = -50;
game.addChild(enemy);
enemies.push(enemy);
}
// Handle game updates
game.update = function () {
// Update hero bullets
for (var i = heroBullets.length - 1; i >= 0; i--) {
heroBullets[i].update();
if (heroBullets[i].y < -50) {
heroBullets[i].destroy();
heroBullets.splice(i, 1);
}
}
// Update enemies
for (var j = enemies.length - 1; j >= 0; j--) {
enemies[j].update();
if (enemies[j].y > 2732 + 50) {
enemies[j].destroy();
enemies.splice(j, 1);
}
}
// Check for collisions between hero bullets and enemies
for (var k = heroBullets.length - 1; k >= 0; k--) {
for (var l = enemies.length - 1; l >= 0; l--) {
if (heroBullets[k].intersects(enemies[l])) {
heroBullets[k].destroy();
enemies[l].destroy();
heroBullets.splice(k, 1);
enemies.splice(l, 1);
score += 10;
break;
}
}
}
};
// Set interval to spawn enemies
LK.setInterval(spawnEnemy, 2000);
// Handle touch events for shooting
game.down = function (x, y, obj) {
hero.shoot();
};
a green cross, icon, pixel style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a sand clock pixel style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bomb, pixel style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pixel harpoon, vertical and looking up, retro like in pang games.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A banner to show a message, pixel art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
two harpoons looking up, retro, pixel. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A chinese flying paper lantern, retro pixel style. In-Game asset. 2d. High contrast. No shadows
fireworks, retro pixel style, colorful. In-Game asset. 2d. High contrast. No shadows
A chinese pixel background of an arcade game, sunset, retro style,. In-Game asset. 2d. High contrast. No shadows