User prompt
Set up an asset unit, named "Archer", positioned in the very center of the screen and unable to move.
User prompt
Let the asset "Kitten" run on the very top of the wall.
User prompt
Place the asset "Wall" at the bottom of the screen and let the asset "Kitten" run along the top of it close to the wall.
User prompt
Increase the height of the kitten to 770.
User prompt
The height dimension of the kitten should be just higher than that of the wall so that it can run on the wall.
User prompt
Increase the upward height dimensions of both the kitten and the wall by 700 at the same time.
User prompt
Clicking on the screen can make the kitten jump up once. The action will end when the kitten falls and touches the wall. The jumping height of the kitten can reach a size of 350.
User prompt
Make the length of the wall extend to the rightmost end of the screen.
User prompt
Design an asset named "Wall". The height of the wall ranges from the bottom of the screen to one-third of the screen, and let the kitten run on the wall.
User prompt
Set up an asset, name it "Kitty", and make it perform the action of running on top of a wall.
User prompt
Delete all assets, all elements and all codes.
User prompt
Help me create a moving landscape that moves backwards, similar to looking out of the window when taking a train.
User prompt
The obstacles and traps will only appear three seconds after the game starts.
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'y')' in or related to this line: 'road.y = 2532; // Starting position on the y-axis' Line Number: 104
User prompt
Make the character, obstacles and traps appear on the same horizontal straight line.
User prompt
Help me build a game similar to a parkour game where you avoid obstacles. The gameplay of this game is that when you click on the screen with the mouse, the character will jump up to avoid the obstacles and traps along the way. The game ends when the character touches an obstacle.
Code edit (1 edits merged)
Please save this source code
User prompt
Make the character's jumping height three times its own height, and it should not be able to jump beyond the periphery of the screen.
User prompt
Adjust the height so that each click can make the character in the center of the screen jump to twice the height.
User prompt
Each click can generate a jump with eight times the force.
User prompt
After clicking on the screen, the upward force of the character's jump will be increased by eight times the current one.
User prompt
Adjust the bouncing height and increase it to one-fourth of the screen.
User prompt
After clicking on the screen, the character will bounce up for a certain distance. The bouncing height is approximately half of the screen, but it will fall back to its original position.
User prompt
Adjust the position and move it down to the one-third position.
User prompt
Make the character stop moving and place it in the centered position.
/****
* Classes
****/
var Kitty = Container.expand(function () {
var self = Container.call(this);
var kittyGraphics = self.attachAsset('Kitty', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
self.x += 5;
if (self.x > 2048) {
self.x = -100;
}
};
});
var Wall = Container.expand(function () {
var self = Container.call(this);
var wallGraphics = self.attachAsset('Wall', {
anchorX: 0.5,
anchorY: 1
});
self.y = 2732;
});
/****
* Initialize Game
****/
//<Write imports for supported plugins here>
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
var kitty = game.addChild(new Kitty());
var wall = game.addChild(new Wall());
kitty.y = 2732 - 100; ===================================================================
--- original.js
+++ change.js
@@ -13,8 +13,16 @@
self.x = -100;
}
};
});
+var Wall = Container.expand(function () {
+ var self = Container.call(this);
+ var wallGraphics = self.attachAsset('Wall', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ self.y = 2732;
+});
/****
* Initialize Game
****/
@@ -26,5 +34,6 @@
/****
* Game Code
****/
var kitty = game.addChild(new Kitty());
+var wall = game.addChild(new Wall());
kitty.y = 2732 - 100;
\ No newline at end of file
A single, cartoonish little monster. It has fur and a big mouth, and its movement posture looks as if it's about to pounce forward.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
It's a 2D planar background. It's a jungle with green grass growing all over the ground and thick forests surrounding it.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An orangutan in a cartoon image.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A bunch of bananas in a cartoon image.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.