User prompt
Every time a SquareWhite is removed, add 50 to the score
User prompt
Make the line 20 characters long, generate each character randomly, increase character size by 3 times
User prompt
place it right in the middle of the game scene
User prompt
Put that line above everything else
User prompt
Make the font white and helvetica for the line of zeros and ones
User prompt
Generate a line of zeros and one's, and put it in the middle of the screen
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var scoreBack = LK.getAsset('ScoreBack', {' Line Number: 58
User prompt
Make all objects invisible
User prompt
Another 10 pixels
User prompt
make Background another 10 pixels widewr
User prompt
Adjust Background so it touches both right and left side of the screen. Keep height the same
User prompt
Make background 20 pixels wider
User prompt
change score font to Blippo
User prompt
move score 20 pixels up
User prompt
Move score and ScoreBack 15 pixels higher
User prompt
Set score to 0
User prompt
Make brown board darker
User prompt
Make 2ndBackground darker
User prompt
Move Scoreback 20 pixels higher. Set score to 90000
User prompt
Make it another 40% taller, and move it 10 pixels to the right
User prompt
Make ScoreBack 30% taller
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var scoreBack = LK.getAsset('ScoreBack', {' Line Number: 72
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var scoreBack = LK.getAsset('ScoreBack', {' Line Number: 72
User prompt
Allign center of ScoreBack with center of score
User prompt
Move Scoreback 10 pixels left
/**** * Initialize Game ****/ //<Assets used in the game will automatically appear here> var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Add 2nd background to the game var background2 = LK.getAsset('2ndBackground', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, width: 2048 * 1.5 * 1.2, height: 2048 * 1.5 * 1.2, orientation: 1 // Rotate the background by 90 degrees }); game.addChild(background2); // Add main background to the game var background = LK.getAsset('Background', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, width: 2000, height: 2000 }); // Add background after adding the squares to the game for (var i = 0; i < gridSize; i++) { for (var j = 0; j < gridSize; j++) { var square = LK.getAsset('SquareWhite', { anchorX: 0.5, anchorY: 0.5, x: startX + i * squareSize, y: startY + j * squareSize, scaleX: 2.04, // Reduce the scaleX by 15% scaleY: 2.04 // Reduce the scaleY by 15% }); square.down = function (x, y, obj) { this.destroy(); }; game.addChild(square); grid.push(square); } } game.addChild(background); // Add brown board to the game var brownBoard = LK.getAsset('BrownBoard', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 6 / 1.5, scaleY: 6 / 1.5 }); game.addChild(brownBoard); // Add ScoreBack behind the score and make it around 1/3 screen long // Add score on top of the screen var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff", font: "Helvetica" }); LK.setScore(10000); scoreTxt.setText(LK.getScore()); scoreTxt.anchor.set(0.5, 0); scoreTxt.y += 20; LK.gui.top.addChild(scoreTxt); var scoreBack = LK.getAsset('ScoreBack', { anchorX: 0.5, anchorY: 0.5, x: scoreTxt.x, // Align center of ScoreBack with center of score y: 20 + 75, // 20 is the y position of the score and 75 is half the height of ScoreBack width: 2048 / 3, height: 150 * 1.3 // Make ScoreBack 1.3 times taller }); LK.gui.top.addChild(scoreBack); // Add score on top of the screen var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff", font: "Helvetica" }); LK.setScore(10000); scoreTxt.setText(LK.getScore()); scoreTxt.anchor.set(0.5, 0); scoreTxt.y += 20; LK.gui.top.addChild(scoreTxt); // Initialize an 8x8 grid of SquareWhite in the middle of the screen var grid = []; var gridSize = 8; var squareSize = 225.28 * 0.95; // Reduce the size of the grid by 5% var startX = (2048 - gridSize * squareSize) / 2 + 110; var startY = (2732 - gridSize * squareSize) / 2 + 90; for (var i = 0; i < gridSize; i++) { for (var j = 0; j < gridSize; j++) { var square = LK.getAsset('SquareWhite', { anchorX: 0.5, anchorY: 0.5, x: startX + i * squareSize, y: startY + j * squareSize, scaleX: 2.112, scaleY: 2.112 }); square.down = function (x, y, obj) { this.destroy(); }; game.addChild(square); grid.push(square); } }
===================================================================
--- original.js
+++ change.js
@@ -59,13 +59,23 @@
scaleY: 6 / 1.5
});
game.addChild(brownBoard);
// Add ScoreBack behind the score and make it around 1/3 screen long
-// Add ScoreBack behind the score and make it around 1/3 screen long
+// Add score on top of the screen
+var scoreTxt = new Text2('0', {
+ size: 150,
+ fill: "#ffffff",
+ font: "Helvetica"
+});
+LK.setScore(10000);
+scoreTxt.setText(LK.getScore());
+scoreTxt.anchor.set(0.5, 0);
+scoreTxt.y += 20;
+LK.gui.top.addChild(scoreTxt);
var scoreBack = LK.getAsset('ScoreBack', {
anchorX: 0.5,
anchorY: 0.5,
- x: 2048 / 2,
+ x: scoreTxt.x,
// Align center of ScoreBack with center of score
y: 20 + 75,
// 20 is the y position of the score and 75 is half the height of ScoreBack
width: 2048 / 3,
Rounded square with fog inside it. Simplistic. Single Game Texture. In-Game asset. 2d. Blank background. Low contrast. No shadows.
square with Neon dark blue borders, simple, cyberpunk, 2d. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
square with Neon dark blue borders, simple, futuristic, 2d. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Light blue Circle Light 2d. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Sci-fi Vault dark Concrete wall texture 2d. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Arrow "backwards" or "undo". White arrow, no background, 2d,. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Scifi Square with thin, rounded corners. Dark grey. 2d. Single Game Texture. Little blue outline
White triangle with sharp edges. White fill, thin outline, 2d, no shadows, blank background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.