Code edit (1 edits merged)
Please save this source code
User prompt
decrease jump strength little bit
User prompt
increase jump strength little bit
User prompt
increase jump strength
User prompt
decrease jump strength
User prompt
make values between 4000 and 400
User prompt
this code doesnt give random heights to tube it makes one static height fix it
User prompt
give tube random heights between 4200 and 400
User prompt
dont preserve aspect ratio of tube when game starts give width value 300 and give random values to height between 300 and 4300
User prompt
keep width at 300 and give random values to height between 300 to 4400
User prompt
make tube spawn only on the bottom not on the top
User prompt
it didnt work make tube assets heigth(length) value between 300 and 4400
User prompt
the screens height is 5000 right now the scale of tube width 300 length 2200 -> 300 x 2200 i want you to make the second value the length random values between 300 to 4400
User prompt
make tube move to left when game starts and has a medium velocity and make it spawn on top and on the bottom
User prompt
when player touches screen make character bend to right a bit and make it return first rotation value agter 0.2 seconds
User prompt
increase strength of jump
User prompt
character can jump on air
User prompt
make character jump when player touches screen doesnt matter when touches screen and create character on the middle of screen when game started
User prompt
whenever player touches screen make character jump and decrease strength of gravity
Initial prompt
fblike
/**** * Classes ****/ //<Write imports for supported plugins here> // Character class with gravity and jump functionality var Character = Container.expand(function () { var self = Container.call(this); var characterGraphics = self.attachAsset('character', { anchorX: 0.5, anchorY: 0.5 }); self.velocityY = 0; self.gravity = 0.5; self.jumpStrength = -20; self.update = function () { self.velocityY += self.gravity; self.y += self.velocityY; // Prevent character from falling through the ground if (self.y > 2732 - 100) { self.y = 2732 - 100; self.velocityY = 0; } }; self.jump = function () { // Allow jump even if in the air self.velocityY = self.jumpStrength; }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize assets used in this game. // Create and position the character in the middle of the screen var character = game.addChild(new Character()); character.x = 2048 / 2; character.y = 2732 / 2; // Create and position the sky at the top of the screen var sky = LK.getAsset('sky', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 5 }); game.addChild(sky); // Create and position the ground at the bottom of the screen var ground = LK.getAsset('ground', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 - 5 }); game.addChild(ground); // Create and position the tube off the right side of the screen var tube = LK.getAsset('tube', { anchorX: 0.5, anchorY: 0.5, x: 2048 + 50, y: 2732 - 150 }); game.addChild(tube); // Handle touch events to make the character jump game.down = function (x, y, obj) { character.jump(); character.rotation = 0.2; LK.setTimeout(function () { character.rotation = 0; }, 200); }; // Update game state every tick game.update = function () { character.update(); };
===================================================================
--- original.js
+++ change.js
@@ -68,8 +68,12 @@
game.addChild(tube);
// Handle touch events to make the character jump
game.down = function (x, y, obj) {
character.jump();
+ character.rotation = 0.2;
+ LK.setTimeout(function () {
+ character.rotation = 0;
+ }, 200);
};
// Update game state every tick
game.update = function () {
character.update();
green theme forest by green tones to the sky , not to much detail just simple tree shadows trees has no details just shadowed green and shadowless places, beautiful view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
hyper realistic nature too reallistic proffational blue sky white clouds yellow sun an over realistic mountain view with full of trees and sun and clouds view a forest of a mountain challangeing mountain road. No background.cool background. view background. No shadows. 2d. In-Game asset. flat