User prompt
When creating the blocks in Game, half block.height and subtract 30px
User prompt
When creating blocks in game, half block.height and subtract 30px
Code edit (4 edits merged)
Please save this source code
User prompt
When positing blocks in block class, also subtract half a block width and half a block height from x and y respectively
User prompt
When positing blocks in block class, divide background width and hight by 2
Code edit (2 edits merged)
Please save this source code
User prompt
In block, create the block elements such that they are centered on the background
Code edit (1 edits merged)
Please save this source code
User prompt
Align the blocks such that the 2nd block are in the center of the screen, the first block is to the left and the right block is to the right
User prompt
Add a background element to block which is 4x4 block wide and tall
User prompt
Assume block tiles are 150px wide and tall
User prompt
Assume the block tiles are 180x180px
User prompt
Add a shape to the shapes array that I a l shape with a left edge of 4 blocks and a bottom edge of 4 blocks, otherwise empty
User prompt
Make sure blocks select a random shape from the array
User prompt
Add one more block type to the shape array
User prompt
Add 3 blocks at the bottom of the game
User prompt
Move down board by 30px
User prompt
Fix Bug: 'ReferenceError: Can't find variable: blocks' in this line: 'for (var a = blocks.length - 1; a >= 0; a--) {' Line Number: 56
User prompt
Add a blocks container to game
User prompt
Remove the boardGraphics, we don't need that
User prompt
Add two more block shapes
User prompt
Add the block shapes from 1010
User prompt
Update the block class to choose a block shape and create that shape inside itself using multiple block elements.
User prompt
The board has a 10x10 grid that can be filled up by blocks, please add a 2d array to handle this
User prompt
Move up board by 250px
===================================================================
--- original.js
+++ change.js
@@ -12,10 +12,10 @@
if (self.shape[i][j] === 1) {
var block = self.createAsset('block', 'Block Graphics', .5, .5);
block.width = 150;
block.height = 150;
- block.x = j * block.width + (background.width - self.shape[0].length * block.width) / 2;
- block.y = i * block.height + (background.height - self.shape.length * block.height) / 2;
+ block.x = j * block.width - (background.width - self.shape[0].length * block.width) / 2;
+ block.y = i * block.height - (background.height - self.shape.length * block.height) / 2;
self.blocks.push(block);
self.addChild(block);
}
}
White square with round corners, flat shaded, hyper casual game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White square with tight round corners, flat shaded, hyper casual game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Background for relaxing puzzle game. Pastel colors, flat shaded, vector art. Flowers. Blocks. Relaxing. Clouds Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White particle cloud. Cartoon. Bright outline. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.