Code edit (1 edits merged)
Please save this source code
User prompt
Obstacles should spawn and be repositioned always over y = 1400
User prompt
Dot should spawn at y = 2000
User prompt
Obstaclea should start spawning from y = 1400 or lowe
User prompt
Create a new class called stairs. Stairs will be continuos steps thar will spawn fromt he right of rhe acreen and move.to the left
User prompt
Obstacles should spawn in the shape of a staircase
User prompt
Obstacles should resposition as stairs steps to keep the initial atair shape continuous
User prompt
Slow spawn time of next obatacle
Code edit (1 edits merged)
Please save this source code
User prompt
If dot intersects with top of obstacle, then it is not game over and dot stays still until tap again and self.bounce again
User prompt
If dot is on top of obstacle the its not game over
User prompt
If dot interects with side of obatacel then game voer
User prompt
Dot should bounce on top of obstacles
User prompt
Obstacles shoild always spawn and be repositioned from the center to the top of the screen
User prompt
Obstacles can spawn or be repositioned on the other side of the screen and move from elft to right
User prompt
Obstacles can spawn from either side randmonly and move on the oposite side direction
Code edit (1 edits merged)
Please save this source code
User prompt
Obstacles should always have 500 pixels y betweem each other
User prompt
Add lava that starts on the floor and starts movign upwarda
User prompt
Lava should also move downards like obstacles when dot reaches center of the screen
User prompt
Lava should also move like obstacles when dot.y less than 1400
User prompt
Lava should never be offscreen
User prompt
Ensure Lava never goes offscreen by resetting its position when it moves too low
User prompt
Lava can't go down below the lower border of the screen
User prompt
Lava should still move upwarda
===================================================================
--- original.js
+++ change.js
@@ -50,9 +50,9 @@
});
self.speed = 1;
self.move = function (offsetY) {
self.y -= self.speed;
- if (self.y < 0) {
+ if (self.y < -self.height / 2) {
self.y = 2732 - self.height / 2;
}
if (offsetY) {
self.y += offsetY;