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
@@ -218,8 +218,20 @@
}
}
return null;
};
+ self.printRowsToConsole = function () {
+ var gridString = '';
+ for (var i = 0; i < rows.length; i++) {
+ var rowString = 'Row ' + i + ': ';
+ for (var j = 0; j < rows[i].length; j++) {
+ var bubble = rows[i][j];
+ rowString += bubble ? '[' + bubble.type + ']' : '[ ]';
+ }
+ gridString += rowString + '\\n';
+ }
+ console.log(gridString);
+ };
// Method to calculate path of movement based on angle and starting point
//TODO: MAKE THIS MUCH FASTER!
self.bubbleIntersectsGrid = function (nextX, nextY) {
outer: for (var row = 0; row < rows.length; row++) {
@@ -233,9 +245,9 @@
}
var dx = nextX - bubble.x - self.x;
var dy = nextY - bubble.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
- if (distance < 70 + bubble.width / 2) {
+ if (distance < (bubble.width - 10) / 2 + bubble.width / 2) {
return bubble;
}
}
}
@@ -288,9 +300,9 @@
var nextX = bubble.x + Math.cos(current.angle) * 20;
var nextY = bubble.y + Math.sin(current.angle) * 20;
if (nextX < 150 / 2 || nextX > 2048 - 150 / 2) {
current.angle = Math.PI - current.angle; // Reflect angle
- nextX = Math.min(Math.max(nextY, 150 / 2), 2048 - 150 / 2);
+ nextX = Math.min(Math.max(nextX, 150 / 2), 2048 - 150 / 2);
// bubble.x = currentPoint.x + stepSize * Math.cos(radians); // Recalculate nextX after reflection
}
var intersectedBubble = self.bubbleIntersectsGrid(nextX + self.x, nextY + self.y);
if (intersectedBubble) {
@@ -348,9 +360,13 @@
bubble.x = offsetPositions[closestPosition].x;
bubble.y = offsetPositions[closestPosition].y;
var row = rows[offsetPositions[closestPosition].ro];
if (!row) {
- row = new Array(rows[intersectedBubblePos.row].length == 13 ? 12 : 13);
+ if (rows[intersectedBubblePos.row].length == 13) {
+ row = [null, null, null, null, null, null, null, null, null, null, null, null];
+ } else {
+ row = [null, null, null, null, null, null, null, null, null, null, null, null, null];
+ }
rows.unshift(row);
}
row[currentPosition.co] = bubble;
console.log(row);
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.