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
Code edit (1 edits merged)
Please save this source code
User prompt
implement /* Based on the intersectedBubble x,y position calculate the 6 points around this bubble where another bubble could exist and put that into a list. */
Code edit (1 edits merged)
Please save this source code
User prompt
implement //Based on intersectedBubblePos calculate the absolute row and column numbers to insert the current moving bubble to attach it to the grid
Code edit (3 edits merged)
Please save this source code
User prompt
fix any spelling errors in the source code
Code edit (3 edits merged)
Please save this source code
User prompt
implement self.findBubbleRowAndColumn = function (bubble) {};
Code edit (1 edits merged)
Please save this source code
User prompt
implement //Calculate the offset from the intersectedBubble to insert the bubble. Use angular math to determine the row / colum offset of where to insert the bubble.
Code edit (4 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -293,27 +293,12 @@
}
var intersectedBubble = self.bubbleIntersectsGrid(nextX + self.x, nextY + self.y);
if (intersectedBubble) {
var intersectedBubblePos = self.findBubbleRowAndColumn(intersectedBubble);
- var potentialPositions = [];
- var rowOffset = intersectedBubblePos.row % 2 == 0 ? 0 : 1;
- var potentialOffsets = [[-1, -1 + rowOffset], [-1, 0 + rowOffset], [0, -1], [0, 1], [1, -1 + rowOffset], [1, 0 + rowOffset]];
- for (var i = 0; i < potentialOffsets.length; i++) {
- var offset = potentialOffsets[i];
- var potentialRow = intersectedBubblePos.row + offset[0];
- var potentialCol = intersectedBubblePos.col + offset[1];
- if (potentialRow >= 0 && potentialRow < rows.length) {
- var rowLength = rows[potentialRow].length;
- if (potentialCol >= 0 && potentialCol < rowLength && !rows[potentialRow][potentialCol]) {
- var potentialX = intersectedBubble.x + offset[1] * intersectedBubble.width;
- var potentialY = intersectedBubble.y + offset[0] * (intersectedBubble.height * 0.866); // 0.866 adjusts for hexagonal close packing
- potentialPositions.push({
- x: potentialX,
- y: potentialY
- });
- }
- }
- }
+ var offsetPositions = [{
+ x: intersectedBubble.x - intersectedBubble.width / 2,
+ y: intersectedBubble.y
+ }];
} else {
bubble.x = nextX;
bubble.y = nextY;
}
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.