User prompt
Particle will appear on the screen for a short time every time the trophy tracking increases โช๐ก Consider importing and using the following plugins: @upit/tween.v1
User prompt
Every 150 points, instead of 3 trap balloons, 2 will drop.
User prompt
Change Tropy tracking location to the other side
User prompt
Every time you earn 1000 points you will win a trophy and there will be a trophy counter in the top left corner to show how many trophies you have collected. โช๐ก Consider importing and using the following plugins: @upit/storage.v1
User prompt
Speed increases by 2 for every 200 points
User prompt
The game will gradually speed up, the initial speed will be 20, and the speed will increase by 2 for every 100 points.
User prompt
stop feature remove slow down i.e. ice
User prompt
Set game speeds 40
User prompt
Set game speeds to 30
User prompt
Set game speed to 24
User prompt
set game speed to 20
User prompt
trap balans fall from different positions at the same time
User prompt
Every 150 points, 3 trap balloons will come instead of 1
User prompt
trapBalloon breaks minus 100 points
User prompt
Increase the number of balloon drops
User prompt
Add a trap balloon, it will come every time you collect 150 points in total and when you press it, it will decrease 60 points
User prompt
All balloons give 20 points, bomb balloon gives 30 points
User prompt
bubbles size 300ร300
User prompt
Reorganize assets, the pieces that are not in the assets are included in the game,
User prompt
When you press the bubbles, they will have a popping effect and sound. โช๐ก Consider importing and using the following plugins: @upit/tween.v1
User prompt
Now fix the other balloons not falling at all, when you press the ice balloon the balloons will not come for 4 seconds and when the time is up the balloon will continue to fall โช๐ก Consider importing and using the following plugins: @upit/tween.v1
User prompt
When you pop the bomb balloon, you will lose -150 points, when you press the ice balloon, it will explode, so the balloons will not fall for 7 seconds and no balloons will come during this time. โช๐ก Consider importing and using the following plugins: @upit/tween.v1
User prompt
Let the bombs, chaos, ice balloons fall one after another and have different functions.
User prompt
add sky to background
User prompt
remove the life event
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Balloon = Container.expand(function () { var self = Container.call(this); self.initBalloon = function (type) { self.balloonType = type; var assetName = type + 'Balloon'; self.balloonGraphics = self.attachAsset(assetName, { anchorX: 0.5, anchorY: 0.5 }); // Set falling speed based on type if (type === 'bomb' || type === 'freeze' || type === 'chaos') { self.fallSpeed = gameSpeed * 0.8; // Special balloons fall slightly slower } else { self.fallSpeed = gameSpeed; } self.isPopped = false; // Add floating animation self.floatOffset = Math.random() * Math.PI * 2; // Random starting phase self.originalX = 0; self.floatTimer = 0; return self; }; self.update = function () { if (!self.isPopped) { self.y += self.fallSpeed * freezeMultiplier; // Add floating side-to-side animation self.floatTimer += 0.05; if (self.originalX === 0) { self.originalX = self.x; } self.x = self.originalX + Math.sin(self.floatTimer + self.floatOffset) * 15; } }; self.down = function (x, y, obj) { if (!self.isPopped) { self.popBalloon(); } }; self.popBalloon = function () { if (self.isPopped) return; self.isPopped = true; // Handle special balloon effects if (self.balloonType === 'bomb') { self.explodeBomb(); LK.getSound('special').play(); } else if (self.balloonType === 'freeze') { self.activateFreeze(); LK.getSound('special').play(); } else if (self.balloonType === 'chaos') { self.activateChaos(); LK.getSound('special').play(); } else { // Regular balloon - just add base score score += baseScore; LK.setScore(score); // Update LK score system LK.getSound('pop').play(); } // Visual popping effect - first expand then shrink with bounce tween(self.balloonGraphics, { scaleX: 1.3, scaleY: 1.3, alpha: 0.9 }, { duration: 80, easing: tween.easeOut, onFinish: function onFinish() { // Then shrink and fade out quickly tween(self.balloonGraphics, { alpha: 0, scaleX: 0.2, scaleY: 0.2 }, { duration: 120, easing: tween.easeIn, onFinish: function onFinish() { self.destroy(); } }); } }); }; self.explodeBomb = function () { var explosionRadius = 200; for (var i = balloons.length - 1; i >= 0; i--) { var otherBalloon = balloons[i]; if (otherBalloon !== self && !otherBalloon.isPopped) { var dx = otherBalloon.x - self.x; var dy = otherBalloon.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance <= explosionRadius) { otherBalloon.popBalloon(); } } } var bombBonus = baseScore * 5; score += bombBonus; // Bonus for bomb LK.setScore(score); // Update LK score system }; self.activateFreeze = function () { freezeMultiplier = 0.3; freezeTimer = 180; // 3 seconds at 60fps var freezeBonus = baseScore * 3; score += freezeBonus; LK.setScore(score); // Update LK score system }; self.activateChaos = function () { // Shuffle all balloon colors on screen for (var i = 0; i < balloons.length; i++) { var balloon = balloons[i]; if (!balloon.isPopped && balloon.balloonType !== 'bomb' && balloon.balloonType !== 'freeze' && balloon.balloonType !== 'chaos') { var newType = regularColors[Math.floor(Math.random() * regularColors.length)]; balloon.changeBalloonType(newType); } } var chaosBonus = baseScore * 2; score += chaosBonus; LK.setScore(score); // Update LK score system }; self.changeBalloonType = function (newType) { self.balloonType = newType; self.removeChild(self.balloonGraphics); var assetName = newType + 'Balloon'; self.balloonGraphics = self.attachAsset(assetName, { anchorX: 0.5, anchorY: 0.5 }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Create sky background var skyBackground = game.addChild(LK.getAsset('skyBackground', { anchorX: 0, anchorY: 0, x: 0, y: 0 })); // Game variables var balloons = []; var score = 0; var baseScore = 10; var gameSpeed = 16; var spawnTimer = 0; var spawnRate = 90; // frames between spawns var regularColors = ['red', 'blue', 'green', 'yellow']; var specialTypes = ['bomb', 'freeze', 'chaos']; var freezeMultiplier = 1.0; var freezeTimer = 0; var gameSpeedIncreaseTimer = 0; // UI Elements var scoreText = new Text2('Score: 0', { size: 60, fill: '#FFFFFF' }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); function spawnBalloon() { var balloon = new Balloon(); var balloonType; // 15% chance for special balloons if (Math.random() < 0.15) { balloonType = specialTypes[Math.floor(Math.random() * specialTypes.length)]; } else { balloonType = regularColors[Math.floor(Math.random() * regularColors.length)]; } balloon.initBalloon(balloonType); balloon.x = Math.random() * (2048 - 200) + 100; // Keep balloons within screen bounds balloon.y = -100; balloons.push(balloon); game.addChild(balloon); } function updateUI() { LK.setScore(score); scoreText.setText('Score: ' + score); } game.update = function () { // Update freeze effect if (freezeTimer > 0) { freezeTimer--; if (freezeTimer <= 0) { freezeMultiplier = 1.0; } } // Increase game speed over time gameSpeedIncreaseTimer++; if (gameSpeedIncreaseTimer >= 600) { // Every 10 seconds gameSpeed += 0.1; gameSpeedIncreaseTimer = 0; if (spawnRate > 30) { spawnRate -= 2; // Spawn balloons more frequently } } // Spawn new balloons spawnTimer++; if (spawnTimer >= spawnRate) { spawnBalloon(); spawnTimer = 0; } // Check for balloons that have fallen off screen for (var i = balloons.length - 1; i >= 0; i--) { var balloon = balloons[i]; if (balloon.y > 2732 + 100) { // Balloon missed - just remove it balloon.destroy(); balloons.splice(i, 1); } } // Update UI updateUI(); }; // Initialize first balloon spawn spawnBalloon();
===================================================================
--- original.js
+++ change.js
@@ -62,24 +62,24 @@
score += baseScore;
LK.setScore(score); // Update LK score system
LK.getSound('pop').play();
}
- // Visual explosion effect - first expand then shrink
+ // Visual popping effect - first expand then shrink with bounce
tween(self.balloonGraphics, {
- scaleX: 1.5,
- scaleY: 1.5,
- alpha: 0.8
+ scaleX: 1.3,
+ scaleY: 1.3,
+ alpha: 0.9
}, {
- duration: 100,
+ duration: 80,
easing: tween.easeOut,
onFinish: function onFinish() {
- // Then shrink and fade out
+ // Then shrink and fade out quickly
tween(self.balloonGraphics, {
alpha: 0,
- scaleX: 0.1,
- scaleY: 0.1
+ scaleX: 0.2,
+ scaleY: 0.2
}, {
- duration: 150,
+ duration: 120,
easing: tween.easeIn,
onFinish: function onFinish() {
self.destroy();
}
@@ -99,15 +99,18 @@
otherBalloon.popBalloon();
}
}
}
- score -= 150; // Lose 150 points for bomb
+ var bombBonus = baseScore * 5;
+ score += bombBonus; // Bonus for bomb
LK.setScore(score); // Update LK score system
};
self.activateFreeze = function () {
- freezeMultiplier = 0; // Stop all movement
- freezeTimer = 240; // 4 seconds at 60fps
- // No score bonus for freeze effect
+ freezeMultiplier = 0.3;
+ freezeTimer = 180; // 3 seconds at 60fps
+ var freezeBonus = baseScore * 3;
+ score += freezeBonus;
+ LK.setScore(score); // Update LK score system
};
self.activateChaos = function () {
// Shuffle all balloon colors on screen
for (var i = 0; i < balloons.length; i++) {
@@ -161,11 +164,8 @@
var specialTypes = ['bomb', 'freeze', 'chaos'];
var freezeMultiplier = 1.0;
var freezeTimer = 0;
var gameSpeedIncreaseTimer = 0;
-var specialBalloonQueue = []; // Queue for special balloons to spawn in sequence
-var specialBalloonTimer = 0;
-var specialBalloonInterval = 300; // Spawn special balloon sequence every 5 seconds (300 frames at 60fps)
// UI Elements
var scoreText = new Text2('Score: 0', {
size: 60,
fill: '#FFFFFF'
@@ -174,11 +174,11 @@
LK.gui.top.addChild(scoreText);
function spawnBalloon() {
var balloon = new Balloon();
var balloonType;
- // Check if it's time for a special balloon in sequence
- if (specialBalloonQueue.length > 0) {
- balloonType = specialBalloonQueue.shift(); // Take next special balloon from queue
+ // 15% chance for special balloons
+ if (Math.random() < 0.15) {
+ balloonType = specialTypes[Math.floor(Math.random() * specialTypes.length)];
} else {
balloonType = regularColors[Math.floor(Math.random() * regularColors.length)];
}
balloon.initBalloon(balloonType);
@@ -198,17 +198,8 @@
if (freezeTimer <= 0) {
freezeMultiplier = 1.0;
}
}
- // Handle special balloon sequence spawning
- specialBalloonTimer++;
- if (specialBalloonTimer >= specialBalloonInterval) {
- // Add all three special balloons to queue in order: bomb, chaos, freeze
- specialBalloonQueue.push('bomb');
- specialBalloonQueue.push('chaos');
- specialBalloonQueue.push('freeze');
- specialBalloonTimer = 0;
- }
// Increase game speed over time
gameSpeedIncreaseTimer++;
if (gameSpeedIncreaseTimer >= 600) {
// Every 10 seconds
@@ -217,15 +208,13 @@
if (spawnRate > 30) {
spawnRate -= 2; // Spawn balloons more frequently
}
}
- // Spawn new balloons (only if not frozen)
- if (freezeMultiplier > 0) {
- spawnTimer++;
- if (spawnTimer >= spawnRate) {
- spawnBalloon();
- spawnTimer = 0;
- }
+ // Spawn new balloons
+ spawnTimer++;
+ if (spawnTimer >= spawnRate) {
+ spawnBalloon();
+ spawnTimer = 0;
}
// Check for balloons that have fallen off screen
for (var i = balloons.length - 1; i >= 0; i--) {
var balloon = balloons[i];