Code edit (1 edits merged)
Please save this source code
User prompt
update with: function getTreasureBonusMultiplier(x, y) { if (!game.treasureZones || game.treasureZones.length === 0) { return 1.0; // No bonus if no treasures } // Start with no bonus var totalBonus = 0; // Check each treasure zone game.treasureZones.forEach(function(zone) { var dx = x - zone.x; var dy = y - zone.y; var distance = Math.sqrt(dx * dx + dy * dy); // If bubble is in zone, add 30% bonus if (distance <= zone.radius) { totalBonus += 0.3; // +30% per overlapping zone } }); // Return multiplier (1.0 = no bonus, 1.3 = one zone, 1.6 = two zones, etc.) return 1.0 + totalBonus; }
Code edit (7 edits merged)
Please save this source code
User prompt
update as needed with: // In the game.update function, modify the title mode bubble spawning: if (game.titleMode) { // Just handle bubble spawning and updates during title // Random bubble spawning if (game.activeBubbles.length < game.MAX_BUBBLES) { if (LK.ticks % game.baseSpawnRate == 0) { var x = Math.random() * (game.width - 200) + 100; var titleBubble = spawnBubble(x, game.height + 100, 100, 0, true); // Apply saved color to the bubble if available if (titleBubble && game.titleColorSettings) { applyTitleScreenColor(titleBubble); } } } // ...rest of existing code }
Code edit (1 edits merged)
Please save this source code
User prompt
update with: // In the game.update function, in the title mode section: if (game.titleMode) { // Just handle bubble spawning and updates during title // Random bubble spawning if (game.activeBubbles.length < game.MAX_BUBBLES) { if (LK.ticks % game.baseSpawnRate == 0) { var x = Math.random() * (game.width - 200) + 100; var titleBubble = spawnBubble(x, game.height + 100, 100, 0, true); // Apply saved color to the bubble if available if (titleBubble && game.titleColorSettings) { applyTitleScreenColor(titleBubble); } } } // Update all active bubbles game.activeBubbles.forEach(function (bubble) { // Always apply color to ensure it's maintained, even for new bubbles from splits if (bubble.visible && game.titleColorSettings) { applyTitleScreenColor(bubble); } if (bubble.update) { bubble.update(); } }); return; // Skip rest of update when in title mode }
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particle is undefined' in or related to this line: 'particle.visible = false;' Line Number: 2238
User prompt
update with: for (var i = 0; i < game.MAX_POP_PARTICLES; i++) { var particle = LK.getAsset('zoneIndicator', { width: 15, height: 15, // Start with larger size alpha: 0, visible: false, anchorX: 0.5, anchorY: 0.5 }); game.addChild(particle); game.popParticlePool.push(particle); }
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particle is undefined' in or related to this line: 'particle.visible = false;' Line Number: 2257
Code edit (4 edits merged)
Please save this source code
User prompt
update as needed with: // In the Fish class, find the update method, and the bubble collision section self.update = function() { self.x += self.fromLeft ? self.speed : -self.speed; // Add 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 fish pops game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint); var points = bubble.getBP(); game.addBP(points, bubble.x, bubble.y, false); // false = manual pop points // 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(); } } }); // Rest of function... };
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']] },
===================================================================
--- original.js
+++ change.js
@@ -717,54 +717,60 @@
}
// Calculate offline progress
// Calculate offline progress
function calculateOfflineProgress(timeDiff) {
- // Convert time diff to seconds, but cap at 12 hours (43200 seconds)
+ // Cap at 12 hours as before
var secondsAway = Math.min(Math.floor(timeDiff / 1000), 43200);
- // Calculate how many bubbles each clam would produce
var totalBP = 0;
// Calculate for each clam type
['basicClam', 'advancedClam', 'premiumClam'].forEach(function (clamType) {
var config = UPGRADE_CONFIG.machines[clamType];
var clamCount = config.amount;
if (clamCount > 0) {
- // Calculate production time with speed upgrade
+ // Same calculation for production rate
var baseTime = config.production;
var speedMultiplier = Math.pow(1 - UPGRADE_EFFECTS.autoBubbleSpeed.decrementPercent / 100, UPGRADE_CONFIG.machine.autoBubbleSpeed.currentLevel);
var adjustedTime = Math.max(1, baseTime * speedMultiplier);
- // Calculate bubbles per second (ensure we're not dividing by zero)
var bubblesPerSecond = clamCount / Math.max(adjustedTime, 0.5);
- // Get base value of bubbles - using the original formula
var bubbleValue = Math.pow(config.bubbleSize, 1.4) * 0.02;
- // Apply quality upgrades
+ // Apply upgrades as before
if (UPGRADE_CONFIG.machine.bubbleQuality.currentLevel > 0) {
bubbleValue *= 1 + 0.4 * UPGRADE_CONFIG.machine.bubbleQuality.currentLevel;
}
- // Apply refinement upgrade
var refinementLevel = UPGRADE_CONFIG.player.bubbleRefinement.currentLevel;
if (refinementLevel > 0) {
bubbleValue *= 1 + 0.25 * refinementLevel;
}
- // Apply color multiplier
var activeColorKey = getActiveColorKey();
var colorMultiplier = 1.0;
if (activeColorKey && UPGRADE_CONFIG.colors[activeColorKey]) {
colorMultiplier = UPGRADE_CONFIG.colors[activeColorKey].multiplier || 1.0;
}
bubbleValue *= colorMultiplier;
- // Calculate total BP this clam type would produce with a progressive penalty
- // The longer you're away, the less efficient your clams become
- var efficiencyFactor = Math.max(0.5, 1 - secondsAway / 86400); // Gradually drops to 50% over 24 hours
+ // New efficiency calculation - starts lower but improves with upgrades
+ var baseEfficiency = 0.06; // Start at just 6% efficiency for new players
+ // Each upgrade type boosts offline efficiency
+ var totalUpgradeLevels = UPGRADE_CONFIG.player.lungCapacity.currentLevel + UPGRADE_CONFIG.player.quickBreath.currentLevel + UPGRADE_CONFIG.player.bubbleRefinement.currentLevel + UPGRADE_CONFIG.machine.bubbleDurability.currentLevel + UPGRADE_CONFIG.machine.autoBubbleSpeed.currentLevel;
+ // Each upgrade adds 0.75% efficiency (up to about 30% with all upgrades)
+ var upgradeBonus = Math.min(0.24, totalUpgradeLevels * 0.0075);
+ // Premium clams provide better offline efficiency
+ var clamTypeBonus = clamType === 'premiumClam' ? 0.1 : clamType === 'advancedClam' ? 0.05 : 0;
+ // Time decay - efficiency drops by half after 24 hours
+ var timeDecay = Math.max(0.5, 1 - secondsAway / 86400);
+ // Final efficiency combines base rate, upgrades, clam type, and time away
+ var efficiencyFactor = (baseEfficiency + upgradeBonus + clamTypeBonus) * timeDecay;
+ // Calculate BP from this clam type
totalBP += bubblesPerSecond * bubbleValue * secondsAway * efficiencyFactor;
}
});
- // Apply a stronger offline penalty (15% of normal production instead of 25%)
- totalBP *= 0.15;
- // Apply a progressive cap based on current BP to prevent huge jumps
- var progressiveCap = Math.min(8000, Math.max(1000, game.bp * 0.5));
- totalBP = Math.min(totalBP, progressiveCap);
- // Round to integer
+ // Round to integer - no additional penalty needed since it's built into the efficiency formula
totalBP = Math.floor(totalBP);
+ // More progressive cap system
+ var minCap = 200; // Minimum cap prevents huge jumps for new players
+ var maxCap = 25000; // Higher maximum for advanced players
+ var percentCap = Math.min(0.75, 0.3 + UPGRADE_CONFIG.player.bubbleRefinement.currentLevel * 0.05); // 30% base, up to 75% with refinement
+ var progressiveCap = Math.min(maxCap, Math.max(minCap, game.bp * percentCap));
+ totalBP = Math.min(totalBP, progressiveCap);
// Add the BP and show a message
if (totalBP > 0) {
game.bp += totalBP;
bpText.setText(formatBP(game.bp) + " BP");
@@ -1624,8 +1630,9 @@
}
// Update visuals
updateClamVisuals();
updateCostTexts('clams');
+ saveGame();
return true;
} else {
game.showError("Not enough BP!");
return true;
@@ -1650,8 +1657,9 @@
updateCostText(category, key, getUpgradeCost(upgrade) + " BP", 0xFFFF00);
// Update visuals
if (category === 'machines') {
updateClamVisuals();
+ saveGame();
} else if (category === 'decorations') {
if (upgrade.amount >= upgrade.maxAmount) {
costText.setText("SOLD OUT");
costText.fill = 0x888888;
@@ -1662,8 +1670,9 @@
if (key === 'bubbleCoral') {
updateCoralDecorations();
} else if (key === 'sunkenTreasures') {
updateTreasureDecorations();
+ saveGame();
}
}
}
} else if (upgrade.currentLevel < upgrade.maxLevel) {
@@ -1671,8 +1680,9 @@
upgrade.currentLevel++;
game.bp -= cost;
LK.getSound('upgrade').play();
bpText.setText(formatBP(game.bp) + " BP");
+ saveGame();
// If this is a color upgrade, update the UI
if (category === 'colors') {
refreshUpgradeTab('colors');
return true;
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