User prompt
update as needed with: // In the Bubble's down method, where it handles popping the other bubble in a twin pair: if (twinPair) { // Mark as popped twinPair.popped = true; twinPair.timestamp = LK.ticks; // Find the other bubble in the pair var otherBubble = twinPair.bubble1 === self ? twinPair.bubble2 : twinPair.bubble1; // Add bonus for twin pop var twinLevel = UPGRADE_CONFIG.player.twinBubbles.currentLevel; var bonusMultiplier = 0.3 + 0.15 * twinLevel; // 30/45/60% bonus // Pop the other bubble automatically and add bonus points if (otherBubble.visible) { // Add pop effect for twin bubble pop game.createPopEffect(otherBubble.x, otherBubble.y, otherBubble.size, otherBubble.colorTint); var bonusPoints = Math.floor(otherBubble.getBP() * bonusMultiplier); game.addBP(bonusPoints, otherBubble.x, otherBubble.y, false); otherBubble.deactivate(); } }
User prompt
increase chance of twin bubble by 5% more per level
Code edit (2 edits merged)
Please save this source code
User prompt
lower base bubble value by 20%
User prompt
lower bubble BP value by 20%
User prompt
lower bubble bp value by 10%
Code edit (1 edits merged)
Please save this source code
User prompt
Make the shade for the purple bubbles a lighter purple.
Code edit (1 edits merged)
Please save this source code
User prompt
Update as needed with: self.update = function() { // ... other update logic ... if (self.y < -self.size) { // Use the deactivate method for consistent cleanup self.deactivate(); return; } // ... more update logic ... };
Code edit (3 edits merged)
Please save this source code
User prompt
Update with: bubbles: { left: [['player', 'lungCapacity'], ['player', 'quickBreath'], ['player', 'bubbleRefinement'], ['player', 'twinBubbles']], right: [['player', 'autoPop'], ['player', 'jellyfish'], ['player', 'sizeVariance'], ['machine', 'bubbleDurability']] },
Code edit (1 edits merged)
Please save this source code
User prompt
Update with: UPGRADE_CONFIG.player.twinBubbles.currentLevel = parseInt(values[7]) || 0; UPGRADE_CONFIG.player.jellyfish.currentLevel = parseInt(values[14]) || 0; // Add this line
User prompt
Update with: storage.simpleUpgrades = // Clams UPGRADE_CONFIG.machines.basicClam.amount + "," + UPGRADE_CONFIG.machines.advancedClam.amount + "," + UPGRADE_CONFIG.machines.premiumClam.amount + "," + // Player upgrades UPGRADE_CONFIG.player.lungCapacity.currentLevel + "," + UPGRADE_CONFIG.player.quickBreath.currentLevel + "," + UPGRADE_CONFIG.player.autoPop.currentLevel + "," + UPGRADE_CONFIG.player.bubbleRefinement.currentLevel + "," + UPGRADE_CONFIG.player.twinBubbles.currentLevel + "," + UPGRADE_CONFIG.player.sizeVariance.currentLevel + "," + // Machine upgrades UPGRADE_CONFIG.machine.bubbleDurability.currentLevel + "," + UPGRADE_CONFIG.machine.autoBubbleSpeed.currentLevel + "," + UPGRADE_CONFIG.machine.bubbleQuality.currentLevel + "," + // Treasures treasureAmount + "," + // Active color setting activeColor + "," + // Jellyfish - add this UPGRADE_CONFIG.player.jellyfish.currentLevel;
User prompt
Update with: // Check if we have the jellyfish value in the array if (values.length >= 15) { UPGRADE_CONFIG.player.jellyfish.currentLevel = parseInt(values[14]) || 0; } else { // For older save files, initialize to 0 UPGRADE_CONFIG.player.jellyfish.currentLevel = 0; }
Code edit (1 edits merged)
Please save this source code
User prompt
Update with: var Jellyfish = Container.expand(function() { var self = Container.call(this); // Create jellyfish sprite var sprite = self.attachAsset('jellyfish', { anchorX: 0.5, anchorY: 0.3, // Set anchor higher to make tentacles flow better x: 0, y: 0 }); // Initialize position and movement self.x = Math.random() * (game.width - 200) + 100; self.y = -100; // Start above screen self.speed = 2.5; // Slower base speed self.targetX = self.x; self.touched = false; // Motion variables self.pulsePhase = Math.random() * Math.PI * 2; // Random starting phase self.pulseFrequency = 0.03 + Math.random() * 0.01; // How fast it pulses self.pulseAmplitude = 0.15; // How much it pulses self.driftPhase = Math.random() * Math.PI * 2; self.driftFrequency = 0.01 + Math.random() * 0.005; self.driftAmount = 30 + Math.random() * 20; // Start pulsing animation immediately self.startPulsingAnimation(); self.startPulsingAnimation = function() { // Cancel any existing animation if (self.pulseAnimation) self.pulseAnimation.stop(); // Create the pulsing animation var originalScaleX = 1; var originalScaleY = 1; // Function to update the pulse animation function updatePulse() { if (!self || !sprite) return; // Safety check var pulseValue = Math.sin(self.pulsePhase); // Scale effect - contract and expand sprite.scaleX = originalScaleX * (1 - pulseValue * self.pulseAmplitude); sprite.scaleY = originalScaleY * (1 + pulseValue * self.pulseAmplitude); // Progress the phase self.pulsePhase += self.pulseFrequency; // Adjust vertical position slightly with pulse self.y += (pulseValue > 0 ? self.speed * 1.2 : self.speed * 0.8); // Update horizontal drift var drift = Math.sin(self.driftPhase) * self.driftAmount / 60; self.targetX += drift; // Constrain to screen bounds self.targetX = Math.max(50, Math.min(game.width - 50, self.targetX)); // Smooth movement toward target X self.x += (self.targetX - self.x) * 0.05; // Progress drift phase self.driftPhase += self.driftFrequency; // Continue animation if not destroyed if (self && !self.destroyed) { LK.setTimeout(updatePulse, 1); } } // Start the update loop updatePulse(); }; self.update = function() { if (self.touched) { // When touched, jellyfish floats up rapidly self.y -= 6; // Check if off screen to destroy if (self.y < -100) { self.destroy(); } return; } // Bubble collision check game.activeBubbles.forEach(function(bubble) { if (bubble.visible) { var dx = self.x - bubble.x; var dy = self.y - bubble.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance <= bubble.size / 2 + 70) { // Add pop effect for jellyfish pops game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint); var points = bubble.getBP(); game.addBP(points, bubble.x, bubble.y, false); // Play a random bubble pop sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); bubble.deactivate(); } } }); // Remove when off bottom of screen if (self.y > game.height + 100) { self.destroy(); } }; // Handle being touched self.down = function() { if (self.touched) return true; self.touched = true; // Play sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); // Spawn bubbles in a jet var bubbleCount = 5 + Math.floor(Math.random() * 3); for (var i = 0; i < bubbleCount; i++) { LK.setTimeout(function() { if (!self) return; // Safety check var size = 50 + Math.random() * 50; var bubble = spawnBubble( self.x + (Math.random() * 40 - 20), self.y + (Math.random() * 40 - 20), size, (Math.random() * 2 - 1) * 2, false ); if (bubble) { bubble.verticalVelocity = -(Math.random() * 6 + 4); } }, i * 5); } // Apply a "flee" animation tween(sprite, { scaleX: sprite.scaleX * 1.3, scaleY: sprite.scaleY * 0.7, // Compress vertically for "squish" effect alpha: 0.8 }, { duration: 300, easing: tween.easeOutBack }); return true; }; return self; });
User prompt
Update jellyfish with: self.update = function() { // Bubble collision check - MOVED OUTSIDE the touched condition // so it works whether the jellyfish is moving down or fleeing up game.activeBubbles.forEach(function(bubble) { if (bubble.visible) { var dx = self.x - bubble.x; var dy = self.y - bubble.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance <= bubble.size / 2 + 70) { // Add pop effect for jellyfish pops game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint); var points = bubble.getBP(); game.addBP(points, bubble.x, bubble.y, false); // Play a random bubble pop sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); bubble.deactivate(); } } }); if (self.touched) { // When touched, jellyfish floats up rapidly self.y -= 6; // Check if off screen to destroy if (self.y < -100) { self.destroy(); } return; } // Remove when off bottom of screen if (self.y > game.height + 100) { self.destroy(); } };
Code edit (1 edits merged)
Please save this source code
User prompt
Add to jellyfish class: self.touched = false; self.immuneTimer = 0; // Timer for bubble popping immunity
User prompt
Update jellyfish only as needed with: self.down = function() { if (self.touched) return true; self.touched = true; self.immuneTimer = 30; // Immunity for 30 frames (half a second) // Play sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); // Spawn bubbles in a jet var bubbleCount = 5 + Math.floor(Math.random() * 3); for (var i = 0; i < bubbleCount; i++) { LK.setTimeout(function() { if (!self) return; // Safety check var size = 50 + Math.random() * 50; var bubble = spawnBubble( self.x + (Math.random() * 40 - 20), self.y + (Math.random() * 40 - 20), size, (Math.random() * 2 - 1) * 2, false ); if (bubble) { bubble.verticalVelocity = -(Math.random() * 6 + 4); } }, i * 5); } // Apply a "flee" animation tween(sprite, { scaleX: sprite.scaleX * 1.3, scaleY: sprite.scaleY * 0.7, alpha: 0.8 }, { duration: 300, easing: tween.easeOutBack }); return true; }; βͺπ‘ Consider importing and using the following plugins: @upit/tween.v1
User prompt
Update with: self.update = function() { // Decrement immunity timer if active if (self.immuneTimer > 0) { self.immuneTimer--; } // Only check for bubble collisions if not immune if (self.immuneTimer === 0) { // Bubble collision check game.activeBubbles.forEach(function(bubble) { if (bubble.visible) { var dx = self.x - bubble.x; var dy = self.y - bubble.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance <= bubble.size / 2 + 70) { // Add pop effect for jellyfish pops game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint); var points = bubble.getBP(); game.addBP(points, bubble.x, bubble.y, false); // Play a random bubble pop sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); bubble.deactivate(); } } }); } if (self.touched) { // When touched, jellyfish floats up rapidly self.y -= 15; // Much faster upward movement // Check if off screen to destroy if (self.y < -100) { self.destroy(); } return; } // Remove when off bottom of screen if (self.y > game.height + 100) { self.destroy(); } };
User prompt
Use the jellyfish sound for when the jellyfish touch event happens instead of bubbles
Code edit (2 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -595,9 +595,9 @@
}
});
if (self.touched) {
// When touched, jellyfish floats up rapidly
- self.y -= 6;
+ self.y -= 5;
// Check if off screen to destroy
if (self.y < -100) {
self.destroy();
}
A treasure chest with gold coins. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A golden skull with diamonds for eyes. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A golden necklace with a ruby pendant. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A filled in white circle.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A yellow star. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
a game logo for a game called 'Bubble Blower Tycoon' about a happy purple pufferfish with yellow fins and spines that builds an underwater empire of bubbles. Cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
an SVG of the word 'Start'. word should be yellow and the font should look like its made out of bubbles. cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
bubblelow
Sound effect
backgroundmusic
Music
bubblehigh
Sound effect
bubble1
Sound effect
bubble2
Sound effect
bubble3
Sound effect
bubble4
Sound effect
blowing
Sound effect
bubbleshoot
Sound effect
fishtank
Sound effect
menuopen
Sound effect
upgrade
Sound effect
jellyfish
Sound effect
titlemusic
Music
startbutton
Sound effect