Code edit (1 edits merged)
Please save this source code
User prompt
add a tree part as extension of the tree near the top of it.
Code edit (1 edits merged)
Please save this source code
User prompt
create a tree sprite 500 pixels wide and as tall as the screen
User prompt
create a background image asset covering the whoel screen
Initial prompt
Bear After Honey
/**** * Classes ****/ //<Assets used in the game will automatically appear here> // Bear class var Bear = Container.expand(function () { var self = Container.call(this); var bearGraphics = self.attachAsset('bear', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Bear update logic }; }); // Bee class var Bee = Container.expand(function () { var self = Container.call(this); var beeGraphics = self.attachAsset('bee', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.y = -self.height; self.x = Math.random() * 2048; } }; }); // Honey class var Honey = Container.expand(function () { var self = Container.call(this); var honeyGraphics = self.attachAsset('honey', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Honey update logic }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB // Sky blue background }); /**** * Game Code ****/ // Initialize game variables var bear; var bees = []; var honeys = []; var score = 0; var scoreTxt; // Initialize game elements function initGame() { // Create background var background = game.addChild(LK.getAsset('background', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 })); // Create tree var tree = game.addChild(LK.getAsset('tree', { anchorX: 0.5, anchorY: 0.0, x: 1024, y: 0 })); // Create bear bear = new Bear(); bear.x = 1024; bear.y = 2400; game.addChild(bear); // Create bees for (var i = 0; i < 5; i++) { var bee = new Bee(); bee.x = Math.random() * 2048; bee.y = Math.random() * -2732; bees.push(bee); game.addChild(bee); } // Create honeys for (var i = 0; i < 3; i++) { var honey = new Honey(); honey.x = Math.random() * 2048; honey.y = Math.random() * -2732; honeys.push(honey); game.addChild(honey); } // Create score text scoreTxt = new Text2('Score: 0', { size: 100, fill: "#ffffff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); } // Update game elements game.update = function () { // Update bear bear.update(); // Update bees for (var i = 0; i < bees.length; i++) { bees[i].update(); if (bear.intersects(bees[i])) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } } // Update honeys for (var i = 0; i < honeys.length; i++) { honeys[i].update(); if (bear.intersects(honeys[i])) { score += 10; scoreTxt.setText('Score: ' + score); honeys[i].destroy(); honeys.splice(i, 1); i--; } } // Add new honey if needed if (honeys.length < 3) { var honey = new Honey(); honey.x = Math.random() * 2048; honey.y = Math.random() * -2732; honeys.push(honey); game.addChild(honey); } }; // Handle touch/mouse events game.down = function (x, y, obj) { bear.x = x; bear.y = y; }; game.move = function (x, y, obj) { bear.x = x; bear.y = y; }; // Initialize game initGame();
===================================================================
--- original.js
+++ change.js
@@ -70,11 +70,9 @@
var tree = game.addChild(LK.getAsset('tree', {
anchorX: 0.5,
anchorY: 0.0,
x: 1024,
- y: 0,
- width: 500,
- height: 2732
+ y: 0
}));
// Create bear
bear = new Bear();
bear.x = 1024;
delete the inpainte area
pixelart. A redwood tree branch .. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
delete all the inpainted areas and replace them with mere transparency.
Pixelart - a cool splash screen style text saying 'Yummy!' golden yellow brown honey colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cool splash screen style text saying 'Delicious Honey!' golden yellow brown honey colors. high-resolution pixel art.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art. some angry bees.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art. a full screen illustration. a likeable and very content little bear cub with a punctured and deflated red baloon is looking down from an incredibly tall redwood tree, inspecting where to get a foothold in order to climb down. The baloon has a puncture in it, from a bee sting, where air is visible flowing out of it, deflating it. the bear's face and fur is smeared a bit with all the delicious golden yellow honey he just ate, which he is enjoying and feeling satiated from. The picture should adhere to the bear's perspective, looking down the tall tree trunk towards the green meadow beneath him. It's a bright summer day with a clear blue sky. Mountains in the distance.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art. a full screen illustration. a likeable and very satiated and content little bear cub with a red baloon is flying away from an incredibly tall redwood tree at considerable height. It's a bright summer day with a clear blue sky. Forest covered mountains in the distance. The overall feel should be happy complacency, even in a place of peril.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart. a crouching two-headed squirrel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.