Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Add grid 7 & 8
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
Make dirt assets small
Code edit (22 edits merged)
Please save this source code
User prompt
Make the dirt resolution HD
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Make the sky below the wall1
Code edit (7 edits merged)
Please save this source code
User prompt
move wall1 to the top
Code edit (1 edits merged)
Please save this source code
User prompt
Make dirt front of sky again
User prompt
Make the sky background behind dirt background
Code edit (9 edits merged)
Please save this source code
User prompt
Make the dirt behind sky background
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Add dirt as background with same scale horizontally as sky. Scale dirt assets vertically and place it between grass and sky backgrounds.
Code edit (1 edits merged)
Please save this source code
User prompt
Scale the wall1 horizontal
Code edit (1 edits merged)
Please save this source code
/**** * Classes ****/ // House class representing upgradeable houses var House = Container.expand(function () { var self = Container.call(this); var houseGraphics = self.attachAsset('house', { anchorX: 0.5, anchorY: 0.5 }); self.upgrade = function (resource) { // Logic for upgrading house with a resource }; }); /**** * Initialize Game ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize arrays and variables var resources = []; var houses = []; var score = 0; // Function to create houses function createHouse(x, y) { var house = new House(); house.x = 2048 - house.width / 2; // Position the house to the right edge of the screen house.y = 2732 - house.height / 2; // Position the house to the bottom edge of the screen houses.push(house); game.addChild(house); } createHouse(1000, 1000); var wall = LK.getAsset('wall1', { anchorX: 0.5, anchorY: 0, x: 1230, y: 0, scaleX: 2 }); game.addChild(wall); game.down = function (x, y, obj) {}; game.up = function (x, y, obj) {}; // Update game logic // Create grid1 and position it on the top left var grid1 = LK.getAsset('grid', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0, scaleX: 5.1, scaleY: 5 }); game.addChild(grid1); // Create grid2 and position it next to grid1 var grid2 = LK.getAsset('grid', { anchorX: -0.8, anchorY: 0.0, x: grid1.width, y: 0, scaleX: 5.1, scaleY: 5 }); game.addChild(grid2); // Create grid3 and position it next to grid2 var grid3 = LK.getAsset('grid', { anchorX: -1.6, anchorY: 0.0, x: grid1.width + grid2.width, y: 0, scaleX: 5.1, scaleY: 5 }); game.addChild(grid3); // Create grid4 and position it next to grid3 var grid4 = LK.getAsset('grid', { anchorX: -2.4, anchorY: 0.0, x: grid1.width + grid2.width + grid3.width, y: 0, scaleX: 5.1, scaleY: 5 }); game.addChild(grid4); // Create grid5 and position it below grid1 var grid5 = LK.getAsset('grid', { anchorX: 0.0, anchorY: -1, x: 0, y: grid1.height, scaleX: 5.1, scaleY: 5 }); game.addChild(grid5); // Create grid6 and position it below grid2 var grid6 = LK.getAsset('grid', { anchorX: -0.8, anchorY: -1, x: grid1.width, y: grid2.height, scaleX: 5.1, scaleY: 5 }); game.addChild(grid6); // Add sky asset to the game as background var sky = LK.getAsset('sky', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 750, scaleX: 7, scaleY: 7 }); game.addChildAt(sky, 0); // Add dirt asset to the game as background var dirt = LK.getAsset('dirt', { anchorX: 0.2, anchorY: 1, x: 100, y: 2500, scaleX: 10, scaleY: 3 }); game.addChildAt(dirt, 1); // Add grass asset to the game as background var grass = LK.getAsset('grass', { anchorX: 0.5, anchorY: 0.2, x: 1100, y: 2600, scaleX: 2.900, scaleY: 1 }); game.addChildAt(grass, 2); // Create grid7 and position it below grid3 var grid7 = LK.getAsset('grid', { anchorX: -1.6, anchorY: -1, x: grid1.width + grid2.width, y: grid3.height, scaleX: 5.1, scaleY: 5 }); game.addChild(grid7); // Create grid8 and position it below grid4 var grid8 = LK.getAsset('grid', { anchorX: -2.4, anchorY: -1, x: grid1.width + grid2.width + grid3.width, y: grid4.height, scaleX: 5.1, scaleY: 5 }); game.addChild(grid8); game.update = function () { houses.forEach(function (house) { // Logic for house updates }); };
===================================================================
--- original.js
+++ change.js
@@ -115,19 +115,19 @@
anchorY: 0.5,
x: 1024,
y: 750,
scaleX: 7,
- scaleY: 2
+ scaleY: 7
});
game.addChildAt(sky, 0);
// Add dirt asset to the game as background
var dirt = LK.getAsset('dirt', {
- anchorX: 0.5,
- anchorY: 0.9,
+ anchorX: 0.2,
+ anchorY: 1,
x: 100,
- y: 2400,
+ y: 2500,
scaleX: 10,
- scaleY: 2.7
+ scaleY: 3
});
game.addChildAt(dirt, 1);
// Add grass asset to the game as background
var grass = LK.getAsset('grass', {
2D wreckage of wood, square, HD colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
House from the front facing the screen with big sign above it have description "SHOP", Hd colors
coin, have "AD" not "$", hd colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows