Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
before calling showGameOver flash screen white
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (23 edits merged)
Please save this source code
User prompt
implement //Loop over rows, if a row only has empty values in it, remove it.
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'game.addChildAt(currentBubble, particleInjectionZIndex);' Line Number: 555
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'currentBubble = hintBubbles[hintBubbleOffset] = new HintBubble();' Line Number: 554
Code edit (10 edits merged)
Please save this source code
User prompt
implement self.printRowsToConsole = function () { //Prints nice representation of the rows grid to console as a string };
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (14 edits merged)
Please save this source code
User prompt
We have the pixel offsets for the bubbles around offsetPositions, however we also want to offset in terms of offset in the rows / columns grid. Can you add that as rx: and ry:
User prompt
Add row / column offsets to offsetPositions
User prompt
implement //Loop trough the offsetPositions and find the one that bubble is closest to
Code edit (4 edits merged)
Please save this source code
User prompt
implement //Calculate the position of potential neighbour bubbles into a list here
===================================================================
--- original.js
+++ change.js
@@ -407,16 +407,16 @@
bubble.destroy();
}
}
if (gameIsStarted) {
- self.y += .5;
+ self.y += gridSpeed;
}
var zeroRow = rows[rows.length - 1];
if (zeroRow) {
for (var a = 0; a < zeroRow.length; a++) {
var bubble = zeroRow[a];
if (bubble) {
- if (bubble.y + self.y > -100) {
+ if (bubble.y + self.y > 0) {
insertRow();
}
break;
}
@@ -428,12 +428,19 @@
if (lastRow) {
for (var a = 0; a < zeroRow.length; a++) {
var bubble = lastRow[a];
if (bubble) {
- if (bubble.y + self.y > 2200) {
+ if (bubble.y + self.y > 2800) {
LK.effects.flashScreen(0xffffff, 3000);
LK.showGameOver();
}
+ if (gameIsStarted) {
+ if (bubble.y + self.y < 1000) {
+ gridSpeed = Math.min(gridSpeed + .01, 1);
+ } else {
+ gridSpeed = Math.max(gridSpeed - .01, .5);
+ }
+ }
break;
}
}
}
@@ -467,8 +474,11 @@
previewBubble.scale.set(1, 1);
createPreviewBubble();
};
self.angle = -Math.PI / 2;
+ self.getTint = function () {
+ return bubble.tint;
+ };
});
var ScoreIndicatorLabel = Container.expand(function (score, type) {
var self = Container.call(this);
var label = new Text2(score, {
@@ -517,8 +527,9 @@
/****
* Game Code
****/
// Function to increase game score and update score label
+var gridSpeed = .5;
function increaseScore(amount) {
var currentScore = LK.getScore();
var newScore = currentScore + amount;
LK.setScore(newScore); // Update the game score using LK method
@@ -534,9 +545,9 @@
[ ]
*/
var bubbleSize = 150;
var gameIsStarted = false;
-var bubbleColors = [0xff3c63, 0x8ed731, 0x4eacff, 0x7436ff, 0xffb230, 0xfffb3c];
+var bubbleColors = [0xff3c63, 0x8ed731, 0x4eacff, 0xb636ff, 0xff8d30, 0xfffb3c];
var barriers = [];
var maxTypes = 5;
for (var a = 0; a < 4; a++) {
for (var b = 0; b < 3; b++) {
@@ -566,9 +577,9 @@
game.addChild(sm);
}
var particlesLayer = game.addChild(new Container());
var grid = game.addChild(new Grid());
-grid.y = 800;
+grid.y = 1000;
var freeBubbleLayer = game.addChild(new Container());
var hintBubblePlayer = game.addChild(new Container());
var launcher = game.addChild(new Launcher());
launcher.x = game.width / 2;
@@ -586,9 +597,9 @@
refreshHintLine();
// }
};
function getMaxTypes() {
- return Math.max(Math.min(Math.floor(LK.getScore() / 10000), bubbleColors.length), 3);
+ return Math.max(Math.min(Math.floor(LK.getScore() / 50000), bubbleColors.length), 3);
}
function refreshHintLine() {
var ox = hintTargetX - launcher.x;
var oy = hintTargetY - launcher.y;
@@ -608,8 +619,9 @@
hintOffset = hintOffset % distanceBetweenHintbubbles;
var distanceSinceLastDot = -hintOffset + 100;
var hintBubbleOffset = 0;
var lastPoint = path[0];
+ var tint = launcher.getTint();
for (var a = 1; a < path.length; a++) {
var p2 = path[a];
var ox = p2.x - lastPoint.x;
var oy = p2.y - lastPoint.y;
@@ -624,8 +636,9 @@
hintBubblePlayer.addChild(currentBubble);
}
currentBubble.alpha = bubbleAlpha;
currentBubble.visible = true;
+ currentBubble.tint = tint;
currentBubble.x = lastPoint.x - Math.cos(angle) * amountOver;
currentBubble.y = lastPoint.y - Math.sin(angle) * amountOver;
hintBubbleOffset++;
distanceSinceLastDot = 0;
Circular white gradient circle on black background. Gradient from white on the center to black on the outer edge all around.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Soft straight Long red paint on black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fire ball. Bubble shooter game. Thin black outline.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green notification bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.