Code edit (17 edits merged)
Please save this source code
User prompt
add a debugMarker to the game
Code edit (1 edits merged)
Please save this source code
User prompt
separate gamePlaying code in functions
Code edit (1 edits merged)
Please save this source code
Code edit (22 edits merged)
Please save this source code
User prompt
divide globalspeed by when falling
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Don’t Count a point when falling
Code edit (1 edits merged)
Please save this source code
User prompt
Update score text
Code edit (15 edits merged)
Please save this source code
User prompt
Add a text2 at top center for the score
User prompt
Add 1 to score for each hurdle passed
User prompt
In Athlete update() Jumpspeed and gravity should grow with globalSpeed
User prompt
Jumpspeed and gravity should grow with globalSpeed
Code edit (1 edits merged)
Please save this source code
User prompt
In gamePlaying after the first flash on collision , add a second flash when athlete reache the ground ( isOnGround==true)
User prompt
after the first flash on collision , add a second flash when athlete reache s the ground ( isOnGround==true)
User prompt
Add a second flash when isFalling and isOnGround
User prompt
Add an additional one time flash when isFalling and isOnGround
User prompt
Add another one time flash when isFalling and isOnGround
Code edit (1 edits merged)
Please save this source code
User prompt
Reduce jump speed as global speed increases
===================================================================
--- original.js
+++ change.js
@@ -415,13 +415,9 @@
newObstacle.y = groundLevel + 200;
obstacles.push(newObstacle);
game.addChild(newObstacle);
}
- if (athlete.isFalling && athlete.isOnGround) {
- // Flash screen red for half a second when athlete hits the ground
- LK.effects.flashScreen(0xff0000, 500);
- athlete.isFalling = false; // Reset falling state after flash
- } else if (!(athlete.isFalling && athlete.isOnGround)) {
+ if (!(athlete.isFalling && athlete.isOnGround)) {
track.update();
track2.update();
} else {
// Stop obstacles movement when athlete is falling and on ground
@@ -444,8 +440,12 @@
LK.showGameOver(); // Show game over screen
}, 1500); // Delay game over to allow fall animation to be seen
}
});
+ if (!athlete.hasFlashedGround && athlete.isFalling && athlete.isOnGround) {
+ LK.effects.flashScreen(0xff0000, 500); // Flash screen red for half a second
+ athlete.hasFlashedGround = true;
+ }
}
/****************************************************************************************** */
/************************************** MAIN GAME LOOP ************************************ */
/****************************************************************************************** */
Elongated elipse with black top half and white bottom half.
full close and front view of empty stands. retro gaming style
delete
delete
Basquettes à ressort futuriste. vue de profile. Retro gaming style
a blue iron man style armor flying. Retro gaming style
a blue iron man style armor flying horizontally. Retro gaming style
round button with a big "up" arrow icon and a small line under it. UI
A big black horizontal arrow pointing left with centred text 'YOU' in capital letters, painted on an orange floor.. horizontal and pointing left
remove
gold athletics medal with ribbon. retro gaming style
a black oval with a crying smiley face.