Code edit (8 edits merged)
Please save this source code
User prompt
the first platform height should be the screen height
User prompt
if the player touch to bottom of the screen, gameover
Code edit (2 edits merged)
Please save this source code
User prompt
add an infinite scrolling background of a tree trunk
Code edit (1 edits merged)
Please save this source code
User prompt
the player can only jump from platform
Code edit (17 edits merged)
Please save this source code
User prompt
the platform should scroll down slowly at start and increasing the speed progressivly
Code edit (2 edits merged)
Please save this source code
User prompt
the platform should scroll down slowly
Code edit (1 edits merged)
Please save this source code
User prompt
the platform scroll down should not be instant but smooth
Code edit (8 edits merged)
Please save this source code
User prompt
when a platform goes to the bottom of the screen, it's moved to the top of the screen at a new random X position and new width.
User prompt
when the player land on a platform, all platform should scroll down of the gap distance
Code edit (9 edits merged)
Please save this source code
User prompt
the platform should be placed randomly on screen from bottom to top, with a small gap between them
Code edit (1 edits merged)
Please save this source code
User prompt
the player should not pass trough platform
User prompt
the platform should have a random width, from 10% to 50% of the width.
User prompt
the player should jump from a platform to another one
User prompt
the player should jump higher
User prompt
the player should follow the X mouse position
User prompt
the platform should be placed randomly on screen
===================================================================
--- original.js
+++ change.js
@@ -93,9 +93,9 @@
for (var i = 0; i < 8; i++) {
var platform = new Obstacle();
platform.width = (Math.random() * (0.3 - 0.1) + 0.1) * 2048;
platform.x = Math.random() * (2048 - platform.width);
- platform.y = i == 0 ? 2732 : 2732 - i * gap;
+ platform.y = i < 1 ? 2732 : 2732 - i * gap;
platform.height = 40;
obstacles.push(game.addChild(platform));
}
var hero = game.addChild(new Hero());
a little squirrel with sun glasses and earring. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d flat leaf green horizontal platform. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
acorn. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.