User prompt
Lütfen hatayı düzeltin: 'Script hatası.' bu satırda veya bu satırla ilgili: 'currentBoard.push(scoreEntry);' Satır Numarası: 1021 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'currentBoard.push(scoreEntry);' Line Number: 1021 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Oyunda skormuzu görek ve Sv mizide görək ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Ve öldüyümuzuzde ana menüye gedey
User prompt
Ve biz bu engelre deydiyimzde ölek
User prompt
Şimdi bu maniyelere deydiyimzde öley ve bu maiyeler hızlı gelsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ya ben sıkıldım diyorum ki bizim önüme maniyelr cıksın ve bizi zorlasın para kasabada ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyundakı o sarı altın şeyelr geliyor a onları kayb et onalrın yerine bizi zorluyan şeyler cıksın özumuze ve ölek ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Abi bir oyun skoru yap ve bir svy yap ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuna kapak fotoğrafı köy
User prompt
Şimdi oyuna ana menü ekleyin içi dolu olsun yap kafana göre bir şeyelr ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Şimdide oyuna altın gelsin altında da basdımızda oyun hızılansın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Yok bu bolanalr gelsin hemde altın para gelsin cobo 259 olun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyun biraz sıkıcı be ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Buna böyle bir şey yap bu oyuna bir en iyi skor köy ve hızlansın Bide biraz maraxlı şeyler ele lutven ↪💡 Consider importing and using the following plugins: @upit/storage.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Bubble Pop Frenzy
Initial prompt
Selam bana bir Oyun yap kafana göre ama eyeleneceli bir şey olsun vakit geçirecek bir şey
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { highScore: 0 }); /**** * Classes ****/ var Bubble = Container.expand(function (isGolden, isBonus) { var self = Container.call(this); self.isGolden = isGolden || false; self.isBonus = isBonus || false; self.speed = Math.random() * 2 + 1; // Random speed between 1-3 self.points = self.isBonus ? 259 : self.isGolden ? 50 : 10; var assetName = self.isBonus ? 'bonusBubble' : self.isGolden ? 'goldenBubble' : 'bubble'; var bubbleGraphics = self.attachAsset(assetName, { anchorX: 0.5, anchorY: 0.5 }); // Bonus bubbles get extreme pulsing effect if (self.isBonus) { tween(bubbleGraphics, { scaleX: 1.5, scaleY: 1.5, rotation: Math.PI / 4 }, { duration: 400, easing: tween.bounceOut, onFinish: function onFinish() { tween(bubbleGraphics, { scaleX: 0.8, scaleY: 0.8, rotation: -Math.PI / 4 }, { duration: 400, easing: tween.bounceOut, onFinish: function onFinish() { // Loop the extreme pulsing effect if (self.parent) { tween(bubbleGraphics, { scaleX: 1.5, scaleY: 1.5, rotation: Math.PI / 4 }, { duration: 400, easing: tween.bounceOut }); } } }); } }); } else if (self.isGolden) { tween(bubbleGraphics, { scaleX: 1.2, scaleY: 1.2 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(bubbleGraphics, { scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { // Loop the pulsing effect if (self.parent) { // Only continue if bubble still exists tween(bubbleGraphics, { scaleX: 1.2, scaleY: 1.2 }, { duration: 800, easing: tween.easeInOut }); } } }); } }); } // Add slight floating animation var floatOffset = Math.random() * Math.PI * 2; self.update = function () { self.y -= self.speed; // Add slight horizontal wobble self.x += Math.sin(LK.ticks * 0.05 + floatOffset) * 0.5; // Add special effects for different bubble types if (self.isBonus) { // Bonus bubbles get super fast rainbow cycling and extra wobble var fastColorPhase = (LK.ticks * 0.1 + floatOffset) % (Math.PI * 2); var red = Math.floor(Math.sin(fastColorPhase) * 127 + 128); var green = Math.floor(Math.sin(fastColorPhase + 2.094) * 127 + 128); var blue = Math.floor(Math.sin(fastColorPhase + 4.188) * 127 + 128); var rainbowColor = red << 16 | green << 8 | blue; bubbleGraphics.tint = rainbowColor; // Extra wobble for bonus bubbles self.x += Math.sin(LK.ticks * 0.1 + floatOffset) * 2; } else if (!self.isGolden) { var colorPhase = (LK.ticks * 0.02 + floatOffset) % (Math.PI * 2); var red = Math.floor(Math.sin(colorPhase) * 127 + 128); var green = Math.floor(Math.sin(colorPhase + 2.094) * 127 + 128); var blue = Math.floor(Math.sin(colorPhase + 4.188) * 127 + 128); var rainbowColor = red << 16 | green << 8 | blue; bubbleGraphics.tint = rainbowColor; } }; self.down = function (x, y, obj) { self.pop(); }; self.pop = function () { // Combo system comboCount++; comboTimer = 180; // 3 seconds to maintain combo var comboMultiplier = Math.min(Math.floor(comboCount / 5) + 1, 5); var finalPoints = self.points * comboMultiplier; // Add points to score LK.setScore(LK.getScore() + finalPoints); // Create floating score indicator var scoreIndicator = new Text2('+' + finalPoints, { size: 50 + comboMultiplier * 10, fill: self.isGolden ? 0xFFD700 : 0x00FF88 }); scoreIndicator.anchor.set(0.5, 0.5); scoreIndicator.x = self.x; scoreIndicator.y = self.y; game.addChild(scoreIndicator); // Animate the floating score tween(scoreIndicator, { y: self.y - 100, alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 1200, easing: tween.easeOut, onFinish: function onFinish() { scoreIndicator.destroy(); } }); // Show combo text for exciting combos if (comboCount >= 5 && comboCount % 5 === 0) { comboTxt.setText('COMBO x' + comboMultiplier + '!'); comboTxt.alpha = 1; comboTxt.scaleX = 1.5; comboTxt.scaleY = 1.5; tween(comboTxt, { alpha: 0, scaleX: 1, scaleY: 1 }, { duration: 1500 }); // Screen shake for big combos screenShakeIntensity = Math.min(comboMultiplier * 2, 10); // Add screen zoom effect for mega combos if (comboCount >= 10) { tween(game, { scaleX: 1.05, scaleY: 1.05 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(game, { scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.bounceOut }); } }); } } // Play pop sound and special effects if (self.isBonus) { LK.getSound('bonusPop').play(); // Bonus bubble creates intense orange screen flash LK.effects.flashScreen(0xFF6B35, 600); // Extra screen shake for bonus bubbles screenShakeIntensity = Math.max(screenShakeIntensity, 15); } else if (self.isGolden) { LK.getSound('goldenPop').play(); // Golden bubble creates screen flash LK.effects.flashScreen(0xFFD700, 300); } else { LK.getSound('pop').play(); } // Create particle burst effect var particleCount = self.isBonus ? 12 : 6; for (var p = 0; p < particleCount; p++) { var particle = LK.getAsset('bubble', { anchorX: 0.5, anchorY: 0.5, scaleX: self.isBonus ? 0.5 : 0.3, scaleY: self.isBonus ? 0.5 : 0.3, x: self.x, y: self.y }); particle.tint = self.isBonus ? 0xFF6B35 : self.isGolden ? 0xFFD700 : bubbleGraphics.tint; game.addChild(particle); var angle = p / particleCount * Math.PI * 2; var distance = self.isBonus ? 120 + Math.random() * 60 : 80 + Math.random() * 40; var targetX = self.x + Math.cos(angle) * distance; var targetY = self.y + Math.sin(angle) * distance; tween(particle, { x: targetX, y: targetY, alpha: 0, scaleX: 0, scaleY: 0, rotation: Math.random() * Math.PI * 2 }, { duration: self.isBonus ? 800 + Math.random() * 400 : 400 + Math.random() * 200, easing: tween.easeOut, onFinish: function onFinish() { particle.destroy(); } }); } // Enhanced pop animation with random rotation var randomRotation = (Math.random() - 0.5) * Math.PI; tween(self, { scaleX: 2, scaleY: 2, alpha: 0, rotation: randomRotation }, { duration: 250, easing: tween.bounceOut, onFinish: function onFinish() { self.destroy(); } }); // Remove from bubbles array for (var i = bubbles.length - 1; i >= 0; i--) { if (bubbles[i] === self) { bubbles.splice(i, 1); break; } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ var bubbles = []; var bubblesEscaped = 0; var maxEscapedBubbles = 10; var spawnTimer = 0; var spawnInterval = 80; // Start spawning faster (80 ticks = ~1.3 seconds) var difficultyTimer = 0; var comboCount = 0; var comboTimer = 0; var screenShakeIntensity = 0; // UI Elements var scoreTxt = new Text2('Score: 0', { size: 60, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var escapedTxt = new Text2('Escaped: 0/10', { size: 50, fill: 0xFFFFFF }); escapedTxt.anchor.set(1, 0); escapedTxt.x = -20; escapedTxt.y = 80; LK.gui.topRight.addChild(escapedTxt); var highScoreTxt = new Text2('Best: ' + storage.highScore, { size: 45, fill: 0xFFD700 }); highScoreTxt.anchor.set(0, 0); highScoreTxt.x = 20; highScoreTxt.y = 80; LK.gui.topLeft.addChild(highScoreTxt); var comboTxt = new Text2('', { size: 70, fill: 0xFF6B35 }); comboTxt.anchor.set(0.5, 0.5); LK.gui.center.addChild(comboTxt); function spawnBubble() { var isBonus = Math.random() < 0.02; // 2% chance for bonus bubble (259 points) var isGolden = !isBonus && Math.random() < 0.1; // 10% chance for golden bubble (only if not bonus) var bubble = new Bubble(isGolden, isBonus); // Random spawn position across screen width bubble.x = Math.random() * (2048 - 200) + 100; bubble.y = 2732 + 60; // Start just below screen bubbles.push(bubble); game.addChild(bubble); } function updateDifficulty() { difficultyTimer++; // Increase difficulty every 7 seconds (420 ticks) - faster progression if (difficultyTimer % 420 === 0) { // Decrease spawn interval (spawn faster) spawnInterval = Math.max(25, spawnInterval - 8); // Increase bubble speed more dramatically for (var i = 0; i < bubbles.length; i++) { bubbles[i].speed += 0.4; } } // Every 30 seconds, spawn a burst of golden bubbles for excitement if (difficultyTimer % 1800 === 0) { for (var j = 0; j < 3; j++) { LK.setTimeout(function () { var goldenBubble = new Bubble(true); goldenBubble.x = Math.random() * (2048 - 200) + 100; goldenBubble.y = 2732 + 60; goldenBubble.speed *= 0.7; // Slower so players can catch them bubbles.push(goldenBubble); game.addChild(goldenBubble); }, j * 300); } } // Every 45 seconds, spawn bonus bubble rain for mega excitement if (difficultyTimer % 2700 === 0) { for (var k = 0; k < 5; k++) { LK.setTimeout(function () { var bonusBubble = new Bubble(false, true); bonusBubble.x = Math.random() * (2048 - 200) + 100; bonusBubble.y = 2732 + 60; bonusBubble.speed *= 0.5; // Much slower so players can definitely catch them bubbles.push(bonusBubble); game.addChild(bonusBubble); }, k * 200); } } } game.update = function () { updateDifficulty(); // Combo timer countdown if (comboTimer > 0) { comboTimer--; if (comboTimer === 0) { comboCount = 0; // Reset combo when timer expires } } // Screen shake effect if (screenShakeIntensity > 0) { game.x = (Math.random() - 0.5) * screenShakeIntensity; game.y = (Math.random() - 0.5) * screenShakeIntensity; screenShakeIntensity *= 0.9; // Gradually reduce shake if (screenShakeIntensity < 0.1) { screenShakeIntensity = 0; game.x = 0; game.y = 0; } } // Spawn bubbles faster spawnTimer++; if (spawnTimer >= spawnInterval) { spawnBubble(); spawnTimer = 0; } // Check for bubbles that escaped for (var i = bubbles.length - 1; i >= 0; i--) { var bubble = bubbles[i]; // Check if bubble escaped (reached top of screen) if (bubble.y < -60) { bubblesEscaped++; bubble.destroy(); bubbles.splice(i, 1); // Reset combo when bubble escapes comboCount = 0; comboTimer = 0; // Update escaped counter escapedTxt.setText('Escaped: ' + bubblesEscaped + '/' + maxEscapedBubbles); // Check game over condition if (bubblesEscaped >= maxEscapedBubbles) { // Update high score before game over var currentScore = LK.getScore(); if (currentScore > storage.highScore) { storage.highScore = currentScore; highScoreTxt.setText('Best: ' + storage.highScore); } LK.showGameOver(); return; } } } // Update score display scoreTxt.setText('Score: ' + LK.getScore()); // Dynamic background color based on score for atmosphere var currentScore = LK.getScore(); var colorPhase = currentScore * 0.01 % (Math.PI * 2); var bgRed = Math.floor(Math.sin(colorPhase) * 40 + 100); var bgGreen = Math.floor(Math.sin(colorPhase + 2.094) * 40 + 150); var bgBlue = Math.floor(Math.sin(colorPhase + 4.188) * 40 + 200); var dynamicBgColor = bgRed << 16 | bgGreen << 8 | bgBlue; game.setBackgroundColor(dynamicBgColor); // Update high score display in real-time if beaten var currentScore = LK.getScore(); if (currentScore > storage.highScore) { storage.highScore = currentScore; highScoreTxt.setText('Best: ' + storage.highScore); highScoreTxt.tint = 0x00FF00; // Green highlight for new record } };
===================================================================
--- original.js
+++ change.js
@@ -8,20 +8,54 @@
/****
* Classes
****/
-var Bubble = Container.expand(function (isGolden) {
+var Bubble = Container.expand(function (isGolden, isBonus) {
var self = Container.call(this);
self.isGolden = isGolden || false;
+ self.isBonus = isBonus || false;
self.speed = Math.random() * 2 + 1; // Random speed between 1-3
- self.points = self.isGolden ? 50 : 10;
- var bubbleGraphics = self.attachAsset(self.isGolden ? 'goldenBubble' : 'bubble', {
+ self.points = self.isBonus ? 259 : self.isGolden ? 50 : 10;
+ var assetName = self.isBonus ? 'bonusBubble' : self.isGolden ? 'goldenBubble' : 'bubble';
+ var bubbleGraphics = self.attachAsset(assetName, {
anchorX: 0.5,
anchorY: 0.5
});
- // Golden bubbles get special pulsing effect
- if (self.isGolden) {
+ // Bonus bubbles get extreme pulsing effect
+ if (self.isBonus) {
tween(bubbleGraphics, {
+ scaleX: 1.5,
+ scaleY: 1.5,
+ rotation: Math.PI / 4
+ }, {
+ duration: 400,
+ easing: tween.bounceOut,
+ onFinish: function onFinish() {
+ tween(bubbleGraphics, {
+ scaleX: 0.8,
+ scaleY: 0.8,
+ rotation: -Math.PI / 4
+ }, {
+ duration: 400,
+ easing: tween.bounceOut,
+ onFinish: function onFinish() {
+ // Loop the extreme pulsing effect
+ if (self.parent) {
+ tween(bubbleGraphics, {
+ scaleX: 1.5,
+ scaleY: 1.5,
+ rotation: Math.PI / 4
+ }, {
+ duration: 400,
+ easing: tween.bounceOut
+ });
+ }
+ }
+ });
+ }
+ });
+ } else if (self.isGolden) {
+ tween(bubbleGraphics, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 800,
@@ -55,10 +89,20 @@
self.update = function () {
self.y -= self.speed;
// Add slight horizontal wobble
self.x += Math.sin(LK.ticks * 0.05 + floatOffset) * 0.5;
- // Add rainbow color cycling to regular bubbles
- if (!self.isGolden) {
+ // Add special effects for different bubble types
+ if (self.isBonus) {
+ // Bonus bubbles get super fast rainbow cycling and extra wobble
+ var fastColorPhase = (LK.ticks * 0.1 + floatOffset) % (Math.PI * 2);
+ var red = Math.floor(Math.sin(fastColorPhase) * 127 + 128);
+ var green = Math.floor(Math.sin(fastColorPhase + 2.094) * 127 + 128);
+ var blue = Math.floor(Math.sin(fastColorPhase + 4.188) * 127 + 128);
+ var rainbowColor = red << 16 | green << 8 | blue;
+ bubbleGraphics.tint = rainbowColor;
+ // Extra wobble for bonus bubbles
+ self.x += Math.sin(LK.ticks * 0.1 + floatOffset) * 2;
+ } else if (!self.isGolden) {
var colorPhase = (LK.ticks * 0.02 + floatOffset) % (Math.PI * 2);
var red = Math.floor(Math.sin(colorPhase) * 127 + 128);
var green = Math.floor(Math.sin(colorPhase + 2.094) * 127 + 128);
var blue = Math.floor(Math.sin(colorPhase + 4.188) * 127 + 128);
@@ -133,30 +177,37 @@
}
});
}
}
- // Play pop sound
- if (self.isGolden) {
+ // Play pop sound and special effects
+ if (self.isBonus) {
+ LK.getSound('bonusPop').play();
+ // Bonus bubble creates intense orange screen flash
+ LK.effects.flashScreen(0xFF6B35, 600);
+ // Extra screen shake for bonus bubbles
+ screenShakeIntensity = Math.max(screenShakeIntensity, 15);
+ } else if (self.isGolden) {
LK.getSound('goldenPop').play();
// Golden bubble creates screen flash
LK.effects.flashScreen(0xFFD700, 300);
} else {
LK.getSound('pop').play();
}
// Create particle burst effect
- for (var p = 0; p < 6; p++) {
+ var particleCount = self.isBonus ? 12 : 6;
+ for (var p = 0; p < particleCount; p++) {
var particle = LK.getAsset('bubble', {
anchorX: 0.5,
anchorY: 0.5,
- scaleX: 0.3,
- scaleY: 0.3,
+ scaleX: self.isBonus ? 0.5 : 0.3,
+ scaleY: self.isBonus ? 0.5 : 0.3,
x: self.x,
y: self.y
});
- particle.tint = self.isGolden ? 0xFFD700 : bubbleGraphics.tint;
+ particle.tint = self.isBonus ? 0xFF6B35 : self.isGolden ? 0xFFD700 : bubbleGraphics.tint;
game.addChild(particle);
- var angle = p / 6 * Math.PI * 2;
- var distance = 80 + Math.random() * 40;
+ var angle = p / particleCount * Math.PI * 2;
+ var distance = self.isBonus ? 120 + Math.random() * 60 : 80 + Math.random() * 40;
var targetX = self.x + Math.cos(angle) * distance;
var targetY = self.y + Math.sin(angle) * distance;
tween(particle, {
x: targetX,
@@ -165,9 +216,9 @@
scaleX: 0,
scaleY: 0,
rotation: Math.random() * Math.PI * 2
}, {
- duration: 400 + Math.random() * 200,
+ duration: self.isBonus ? 800 + Math.random() * 400 : 400 + Math.random() * 200,
easing: tween.easeOut,
onFinish: function onFinish() {
particle.destroy();
}
@@ -246,10 +297,11 @@
});
comboTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(comboTxt);
function spawnBubble() {
- var isGolden = Math.random() < 0.1; // 10% chance for golden bubble
- var bubble = new Bubble(isGolden);
+ var isBonus = Math.random() < 0.02; // 2% chance for bonus bubble (259 points)
+ var isGolden = !isBonus && Math.random() < 0.1; // 10% chance for golden bubble (only if not bonus)
+ var bubble = new Bubble(isGolden, isBonus);
// Random spawn position across screen width
bubble.x = Math.random() * (2048 - 200) + 100;
bubble.y = 2732 + 60; // Start just below screen
bubbles.push(bubble);
@@ -278,8 +330,21 @@
game.addChild(goldenBubble);
}, j * 300);
}
}
+ // Every 45 seconds, spawn bonus bubble rain for mega excitement
+ if (difficultyTimer % 2700 === 0) {
+ for (var k = 0; k < 5; k++) {
+ LK.setTimeout(function () {
+ var bonusBubble = new Bubble(false, true);
+ bonusBubble.x = Math.random() * (2048 - 200) + 100;
+ bonusBubble.y = 2732 + 60;
+ bonusBubble.speed *= 0.5; // Much slower so players can definitely catch them
+ bubbles.push(bonusBubble);
+ game.addChild(bonusBubble);
+ }, k * 200);
+ }
+ }
}
game.update = function () {
updateDifficulty();
// Combo timer countdown